Stat 506 knitR

knitr requires R 2.14.0 or better.
It is supported in the current version of Rstudio. You need to install LaTeX. to use it, and have to learn some minimal LaTeX formatting commands.

install.packages('knitr', dep=T)
require(knitr)
knit("myfile.Rnw")             ## build   myfile.tex
system("pdflatex myfile.tex")  ## process it to make the pdf
knit2pdf("myfile.Rnw")         ## in 1 step
purl("myfile.Rnw")             ## extract R code into myfile.R

Options

knitR website