在linux上,我正在尝试将R Sweave命令更改为knitr。当前(R Sweave)命令位于options >configure下:
R CMD Sweave %.Rnw易辉给出了在windows here上如何做到这一点的例子。
在linux (ubuntu)上如何做到这一点?
发布于 2013-03-19 02:38:06
在Linux上,Rscript不是使用Rscript.exe调用的。只需将Rscript.exe更改为Rscript。
发布于 2013-05-30 15:53:20
我只是想补充一下,我刚刚发现,当子Rnw文档包含在\Sexpr{knit_child('path')}中时,上面提到的代码不起作用。
请改用Rscript -e "library(knitr); knit('%.Rnw')"。
如果你知道knit::knit2pdf()和knit()在输出上有什么不同,请在评论中注明。
https://stackoverflow.com/questions/15482138
复制相似问题