2015-10-09 22 views
1

我正在使用R rmarkdown包将.Rmd文件转换为html输出。 这个包使用pandoc来转换.md文件到html,据我所知。在我的CentOS机版本如下如何在Rmarkdown中指定pandoc的全局路径

CentOS Linux release 7.0.1406 (Core) 
NAME="CentOS Linux" 
VERSION="7 (Core)" 
ID="centos" 
ID_LIKE="rhel fedora" 
VERSION_ID="7" 
PRETTY_NAME="CentOS Linux 7 (Core)" 
ANSI_COLOR="0;31" 
CPE_NAME="cpe:/o:centos:centos:7" 
HOME_URL="https://www.centos.org/" 
BUG_REPORT_URL="https://bugs.centos.org/" 

CentOS Linux release 7.0.1406 (Core) 
CentOS Linux release 7.0.1406 (Core) 
cpe:/o:centos:centos:7 

我有一个pandoc配版本

-bash-4.2$ pandoc --version 
pandoc 1.12.4.2 

但是当我运行rmarkdown::render()功能我收到了这样的错误

Error: pandoc version 1.12.3 or higher is required and was not found. 
Execution halted 

我觉得R正在使用它的本地pandoc,看起来像我的全球pandoc更老。有谁知道如何指定一个全球路径pandocR rmarkdown

+0

R' –

+2

选中此[一](http://stackoverflow.com/questions/28432607/pandoc-version-1-12-3-or-higher-is-required-and-was-not-found-r-shiny)或这[一](https://stat.ethz.ch/pipermail/r-help/2014-August/421215.html)。 – langusta

+0

@Michał我正在使用shell。 –

回答