Compile .Rnw file with command

2019-08-31 12:34发布

I have .Rnw file which generates me a report. In RStudio you compile it with button 'Compile PDF'.

But is there a way to compile this file with command in script and pass one character variable?

I tried to use function knit() but it only produces .tex file and I would like to obtain also pdf.

Thanks for your help in advance!

标签: r knitr sweave
1条回答
时光不老,我们不散
2楼-- · 2019-08-31 12:38

The function knit2pdf in the knitr package does the trick ;)

查看更多
登录 后发表回答