I have a rmarkdown document that I render regularly with rmarkdown::render
It works fine on my computer (Windows) as I have RStudio installed, and it has setup automatically the path to pandoc.
However when I try to run it on my server (outside RStudio), it fails with error that pandoc is not found.
How can I set up manually the path the pandoc from my script? Without changing the configuration on the server.
I have tried this but it doesn't work:
Sys.setenv(RSTUDIO_PANDOC="PATH_TO_MY_PANDOC_BIN/binaries/pandoc/pandoc.exe")
I suggest to set the system path for pandoc (Windows 10 instructions):
1. In the Start menu, search for "Edit the system environment variables"
2. At this point, Windows may ask you for username + password (for a user with permission to change system settings)
3. Click "Environment Variables" button
4. In the lower part of the window (System variables), select the line with "Path" and click Edit
5. Add the path to the folder where pandoc.exe is, but not including "pandoc.exe" or a slash at the end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With