我有一个
flexdashboard
当我计划每周运行一次时创建的。
我把它包装在一个名为 run-script
的 R 文件中
当我在 RStudio IDE 中获取文件时,它工作得很好。
当我使用 Windows 调度程序安排它时,出现错误:
错误:需要 pandoc 1.12.3 或更高版本但未找到(请参阅帮助页面 ?rmarkdown::pandoc_available)。 执行暂停
# This is the guts of the script in the "run-script" file
# This builds the RMD up into a webpage which is then saved to sharepoint (See aspx)
rmarkdown::render("Report.Rmd", flex_dashboard(theme='simplex', orientation = 'rows',
vertical_layout = 'scroll'),
quiet = TRUE, output_file = "Report.aspx", output_dir = sharepoint)
我在构建项目时使用了包
renv
但它和我的系统都有一个 pandoc 版本:
> rmarkdown::pandoc_version()
[1] ‘2.19.2’
任何人都可以建议寻找问题吗?
谢谢