1

I'm running R markdown through sshing a remote Linux computer. So it's not RStudio.

Naturally, when I try to render, it yields an error.

> render("markdown.Rmd", output_file = 'markdown_output.html')
Error: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).

I do have pandoc installed under the same directory as the R script and markdown script.

$ ./pandoc --version
pandoc 2.10.1
Compiled with pandoc-types 1.21, texmath 0.12.0.2, skylighting 0.8.5
Default user data directory: /home/ks4139/.local/share/pandoc or /home/ks4139/.pandoc
Copyright (C) 2006-2020 John MacFarlane

Question: How do I specify the path of pandoc in the R script?

Bunbury
  • 123
  • 5
  • 1
    You probably can specify something like `Sys.setenv(RSTUDIO_PANDOC=".")`? See [pandoc version 1.12.3 or higher is required and was not found (R shiny)](https://stackoverflow.com/questions/28432607/pandoc-version-1-12-3-or-higher-is-required-and-was-not-found-r-shiny) –  Jul 29 '20 at 06:27
  • It's not working for me. I'm not using Rstudio, so not sure that RSTUDIO parameter woudl help – Bunbury Jul 29 '20 at 07:48
  • Have you tried `rmarkdown::find_pandoc()` and `rmarkdown::pandoc_exec()` ? – meriops Jul 29 '20 at 09:06
  • if you have root access you can alter the pandocs priority with update-alternatives, I imagine it is not the case. – Ferroao Feb 06 '21 at 00:18

0 Answers0