如何在xtable的表格中放置颜色间距? [英] How to put a spacing of colors in a table of xtable?
本文介绍了如何在xtable的表格中放置颜色间距?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在xtable的表格中放置颜色间距?
How to put a spacing of colors in a table of xtable?
我使用以下说明生成表格:
I generate the tables with the following instructions:
test.table<-xtable(summary(test),caption='test', floating = FALSE)
align(test.table) <- "|c|l|"
print(test.table,caption.placement='top')
感谢您的回答
推荐答案
html.table.attributes
参数需要一个长度等于表数的字符向量.这会在相当难看的黄橙色背景上生成一个带边框的居中表格:
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"' )
如果您的目标是 LaTeX,请使用:tabular.environment=
And if you're targeting LaTeX use: tabular.environment=
这篇关于如何在xtable的表格中放置颜色间距?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文