1

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!

Michał
  • 273
  • 1
  • 3
  • 13
  • This might help: http://tex.stackexchange.com/questions/132704/how-to-build-knitr-document-from-the-command-line –  Aug 20 '15 at 10:28

1 Answers1

2

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

Rodrigo Zepeda
  • 1,935
  • 2
  • 15
  • 25