Pandoc for generating html file not using RStudio

Viewed 1190

I'd like to generate html file via script below which is a part of complex source code but I don't want to install RStudio on users machine.

I'm using pandoc available at: pandoc from github and the reference for path to this pandoc file is used in Sys.setenv: "C:/Users/username/AppData/Local/Pandoc".

If I use RSTUDIO_PANDOC in Sys.setenv command, everything works fine in my script below but I'm just confused if RSTUDIO_PANDOC in Sys.setenv command uses default RStudio pandoc file which I don't wanna use. Is there any replacement by RSTUDIO_PANDOC to be sure I don't need RStudio to be installed on user's machine and I can refer only to pandoc file what I downloaded from the link above.

Sys.setenv(RSTUDIO_PANDOC="C:/Users/username/AppData/Local/Pandoc")
setwd("C:/Users/username/interactiveKnitr") # set path to .Rmd file
knit('knit.Rmd') # creates md file
render('knit.Rmd') # creates html file

Thank you very much for any of your explanation and help on this. I'm very new in this area.

1 Answers
Related