【发布时间】:2016-01-07 07:26:48
【问题描述】:
我正在使用 R rmarkdown 包将 .Rmd 文件呈现到 html 输出。
据我了解,此软件包使用pandoc 将.md 文件转换为html。在我的CentOS 机器下,版本如下
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 更老。有谁知道如何在R rmarkdown 中指定全局pandoc 的全局路径?
【问题讨论】:
-
你在使用 RStudio?
-
@Michał 我正在使用 shell。
-
正如@langusta 建议的那样,我使用了这个答案并且它有效stackoverflow.com/a/29710643/3857701。
标签: r r-markdown pandoc