Sunday, October 25, 2015

Create a PDF file from Knitr in Windows.

To save the knitr Rmd files as PDF on windows platform
  1. install.packages("knitr")
  2. install.packages("markdown")
  3. require(knitr)
  4. require(markdown)
  5. Create your markdown file. 




6. Install the miktex:

7. Install the pandoc:

8. knit("MyFile.Rmd")
9. markdownToHTML('MyFile.md', 'MyFile.html', options=c("use_xhml"))
10. system("pandoc -s MyFile.html -o MyFile.pdf")


No comments:

Post a Comment