将xtable与longtable选项一起使用时重复标题 [英] Repeat headers when using xtable with longtable option
本文介绍了将xtable与longtable选项一起使用时重复标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在生成带有longtable选项的xtable时,是否可以重复顶部行/set标头?
Is there a way to repeat the top row / set headers when generating an xtable with a longtable option ?
例如,如果我有
tableSb <- xtable(df, caption="A Very Long Table", label="ALongTable")
print(tableSb, include.rownames=TRUE, tabular.environment="longtable", floating=FALSE)
这很好,但是当表翻转到新页面时,标题将不会重复.有什么建议吗?
This works fine, but when the tables roll over into a new page the headers are not repeated. Any suggestions ?
推荐答案
为此,您需要使用print
函数的add.to.row
选项(有关更多信息,请运行?print.xtable
).
In order to accomplish this, you'll need to use the add.to.row
option of the print
function (run ?print.xtable
for more information).
查看全文