[R] R studio kniter

Duncan Murdoch murdoch.duncan at gmail.com
Tue Mar 22 18:30:44 CET 2016


On 22/03/2016 1:08 PM, Jan Kacaba wrote:
> Hello, is it possible to run kiniter by script instead by clicking on
> button compile PDF?
>
> Say I have "texfile.rnw" and "myscript.R". I would like to knit texfile.rnw
> by runnig script "myscript.R".
> In "myscript.R" I would write something like this:
> knit("texfile.rnw")

That exact command works.  It will produce a .tex file; if you want to 
continue on to produce a PDF, you need

knit2pdf("texfile.rnw")

instead.

Duncan Murdoch



More information about the R-help mailing list