avoid checking examples for R package building using devtools

非 Y 不嫁゛ 提交于 2021-01-21 08:02:04

问题


I am using devtools to build my R package, and use the function check to check the package (with a long list of outputs on screen). However, because my package includes examples, and some of the examples are time-consuming, I am wondering how can I suppress checking examples when checking the package in devtools. The check function itself seems to not have such option. Thanks!


回答1:


You need to set the args argument appropriately with command line arguments to R CMD check. The latter has --no-examples so try

check(...., args = "--no-examples")

where .... are the other arguments you were using for check().

You can see all the arguments for R CMD check by running it with R CMD check --help at a command prompt/shell. To pass more than one to check() you'll need to concatenate them into a character vector, e.g.:

check(...., args = c("--no-examples", "--no-tests"))


来源:https://stackoverflow.com/questions/17158049/avoid-checking-examples-for-r-package-building-using-devtools

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