本文介绍了如何删除Knitr输出的xtable表中的%行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
通过使用xtable和knitr,我将表添加到RMD文档中并导出到PDF文件.
By using xtable and knitr, I add a table to my RMD document and export to PDF file.
```{r, results='asis'}
library(xtable)
xtable(matrixtable)
````
看起来好极了,除了有一行
It looks great except there is a line
% latex table generated in R 3.1.0 by xtable 1.7-3 package % Wed Jun 25 13:34:57 2014
如何删除此行.我试图设置message=FALSE
,但是它不起作用.
How can I remove this line. I tried to set message=FALSE
but it doesn't work.
推荐答案
最终表中是否包含comment
是由print.xtable的comment参数定义的.
The inclusion of the comment
in the final table is defined by the comment argument to print.xtable
默认值为getOption('xtable.comment',TRUE)
.
所以,如果您设置了
options(xtable.comment = FALSE)
然后在以后的任何表格中都不会生成此注释.
then for any future tables this comment will not produced.
这篇关于如何删除Knitr输出的xtable表中的%行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!