由于pandoc,rmarkdown无法正常工作

时间:2017-04-04 18:43:26

标签: r rstudio

您好我刚刚更新了我的RStudio版本,现在我无法创建markdown文件。 我将RStudio升级为verion:1.0.136

My version of R is 3.2.5. 

Version of these packages:
knitr: 1.15.1
rmarkdown: 1.4

注意我已经安装了MikTEX,它运行得很好。我被写了降价文件。

现在我只需创建一个新的r markdown pdf文件并单击编织,我就会收到此错误:

pandoc version 1.12.3 or higher is required and was not found

我需要做些什么才能让针织运行?

当我跑

> pandoc_available(version = NULL, error = FALSE)
[1] FALSE
> 
> pandoc_version()
NULL

2 个答案:

答案 0 :(得分:0)

如果您使用的是Windows机器,这是安装pandoc最简单的方法。

install.packages("installr")
library(installr) 

install.pandoc()

答案 1 :(得分:0)

使用服务器时遇到此问题。通过终端安装pandoc后,我能够运行.Rmd文件。

sudo apt-get pandoc

然后为html输出调用带有

的.Rmd
R -e rmarkdown::render('/path/to/file.Rmd',output_file='/path/to/output.html')
相关问题