![]() So, a number of people have suggested that Pandoc is the way to go. So for example, on my computer running OSX, where I have a copy of pandoc through RStudio, I can use the following: Rscript -e "Sys.setenv(RSTUDIO_PANDOC='/Applications/RStudio.app/Contents/MacOS/pandoc') library(rmarkdown) library(utils) render('input.Rmd', 'pdf_document')" The following answer explains how to add pandoc to the R environment. ![]() Presumably, it is not on the search path. When I run render from the command-line (e.g., using a makefile), I sometimes have issues with pandoc not being found. E.g., render("input.Rmd", "pdf_document") This includes including output formats in the rmarkdown file or running supplying an output format to the rend function. The documentation makes it pretty clear how to convert rmarkdown to pdf among a range of other formats. There is now an rmarkdown package available on github that interfaces with Pandoc.
0 Comments
Leave a Reply. |