What is a neat command line equivalent to RStudio's Knit HTML? Given an .Rmd
file, you can use RStudio to knit .html
, .docx
and .pdf
files using Knitr. It would be great to shift this process completely to the command line. My approach so far:
Rscript -e "library(knitr); knit('test.Rmd')" # This creates test.md
pandoc test.md >> test.html
This works fine, but the resulting test.html
does not come with the same pretty make over as in RStudio. Any suggestions how one should best knit .Rmd
files to .html
via the command line, and end up with a pretty .html
?
Extra question: What would be the best command line solution for .pdf
or .docx
?