我想最终使用“R”脚本将我的 Sweave 文件转换为 PDF。我了解到,Sweave(file="TEST.Rnw") 是可以将我的 .Rnw 转换为 .tex 的函数。
但是当我在具有如下代码块的 .Rnw 文件上使用它时,我看到了一个奇怪的问题:
<<results='asis', comment=NA, echo=FALSE, warning=FALSE>>=
...
@
这是错误,我得到:
Error in match.arg(options$results, c("verbatim", "tex", "hide")) :
'arg' should be one of "verbatim", "tex", "hide"
请注意,当我更改 results='tex' 时,Sweave() 会起作用。但这对我没有帮助,因为我有一些需要以乳胶形式出现的 xtable 内容。The simple question, therefore, is, when the option results='asis' works on RStudio (Complile PDF), why it does not with Sweave function call? 我错过了什么吗?
任何关于此的灯都将受到高度赞赏......提前谢谢。
问候, 塔玛