Skip to content

R studio kniter

2 messages · derek, Duncan Murdoch

#
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")
#
On 22/03/2016 1:08 PM, Jan Kacaba wrote:
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