How do I fix a “System command error” when running “devtools::build_vignettes()” in R?

泪湿孤枕 提交于 2021-02-08 10:18:40

问题


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 

Then Errors occurred:

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

My R version is 3.6.0.


回答1:


I get similar issue when run devtools::build_vignettes().

In my case reason of this issue was that I made a mistake in namespace in the names of exported functions.

So try to verify the package by devtools::check()

But also you can try next:

  1. Check you PATH, there must be a path to rtools: C:\Rtools\bin\; and C:\Rtools\mingw_64\bin\.

  2. Set system environment variables BINPREF "C:/Rtools/mingw_64/bin/".



来源:https://stackoverflow.com/questions/56208400/how-do-i-fix-a-system-command-error-when-running-devtoolsbuild-vignettes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!