pandoc version 1.12.3 or higher is required and was not found (R shiny)

后端 未结 10 2685
轮回少年
轮回少年 2020-11-29 02:09

I have a problem generating a pdf report from my app shiny which is hosted on a server.

the app works fine but when I press the button to download the report, I get

10条回答
  •  萌比男神i
    2020-11-29 03:02

    Go into RStudio and find the system environment variable for RSTUDIO_PANDOC

    Sys.getenv("RSTUDIO_PANDOC")
    

    Then put that in your R script prior to calling the render command.

    Sys.setenv(RSTUDIO_PANDOC="--- insert directory here ---")
    

    This worked for me after I'd been struggling to find how rmarkdown finds pandoc. I had to check github to look at the source.

提交回复
热议问题