Create a gist now

Instantly share code, notes, and snippets.

## title:First Attempt at a knitr Performance Report
## author:Timely Portfolio
main="EDHEC Performance by Type")
#use stitch to open and run the knitr performance.r script
# and then generate Rnw code
#knit2pdf converts the Rnw to a pdf
knit2pdf(stitch("knitr performance.r"))

Nice example. It seems

knit2pdf(stitch("knitr performance.r", output = NULL))

should be

stitch("knitr performance.r")

because stitch() will compile the tex output to PDF automatically. Besides, I do not recommend spaces in paths or filenames; sometimes they bring troubles when we call external programs like LaTeX.


you are welcome to play with the LaTeX part of knitr which should be mature enough now; once the markdown support becomes mature, I believe all R users should be able to play with dynamic report generation easily because no knowledge of LaTeX is required then -- it can be even simpler than Word.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment