在R中运行"devtools :: build_vignettes()"时,如何解决“系统命令错误"? [英] How do I fix a “System command error” when running “devtools::build_vignettes()” in R?
问题描述
我正在开发一个程序包.包根目录中的"./vignettes"文件夹中已经存在".Rmd"文件.我想自动将".html"和".pdf"文档创建到./inst/doc中,因此运行以下代码:
I am developing a package. The ".Rmd" files already exist in the "./vignettes" folder in the root directory of the package. I want to automatically create ".html" and ".pdf" documents into./inst/doc, so run the following code:
library("devtools")
build_vignettes
然后发生错误:
构建PhosMap渐晕(函数(命令= NULL,args = character(),error_on_status = TRUE ,:系统命令错误
(函数中的错误(命令= NULL,args = character(),error_on_status = TRUE ,:系统命令错误
Building PhosMap vignettes Error in (function (command = NULL, args = character(), error_on_status = TRUE, : System command error
Error in (function (command = NULL, args = character(), error_on_status = TRUE, : System command error
我的R版本是3.6.0.
My R version is 3.6.0.
推荐答案
运行 devtools :: build_vignettes()
时,我遇到类似的问题.
I get similar issue when run devtools::build_vignettes()
.
在我的情况下,出现此问题的原因是我在 namespace
中错误地导出了函数的名称.
In my case reason of this issue was that I made a mistake in namespace
in the names of exported functions.
因此,请尝试通过 devtools :: check()
但是您也可以尝试下一个:
But also you can try next:
-
检查您的PATH,必须有一个指向rtools的路径:
C:\ Rtools \ bin \;
和C:\ Rtools \ mingw_64 \ bin \
.
设置系统环境变量BINPREF "C:/Rtools/mingw_64/bin/"
.
Set system environment variables BINPREF "C:/Rtools/mingw_64/bin/"
.
这篇关于在R中运行"devtools :: build_vignettes()"时,如何解决“系统命令错误"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!