How to put a spacing of colors in a table of xtable?

匆匆过客 提交于 2019-12-01 11:16:55
42-

The html.table.attributes parameter needs a character vector of length equal to number of tables. This produces a bordered, centered table on a rather ugly yellow-orange background:

data(tli)
tli.table <- xtable(tli[1:20,])
digits(tli.table)[c(2,6)] <- 0
print(tli.table,type="html",
      html.table.attributes='border='1' align="center" bgcolor="#FFCC00"' )

And if you're targeting LaTeX use: tabular.environment=

html.table.attributes = list('border="1" bgcolor="#FFCC00"'))

will work!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!