Do not check examples for building an R package with devtools

I use devtools to build my R package and use the check function to check the package (with a long list of outputs on the screen). However, since my package contains examples, and some of the examples are time consuming, I am wondering how I can suppress the validation of examples when checking the package in devtools . The check function does not seem to have such an option. Thanks!

+4
source share
1 answer

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

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

where .... are the other arguments that you used for check() .

You can see all the arguments for the R CMD check by running it with the R CMD check --help in the command line / shell. To pass more than one value to check() , you need to associate them with a character symbol, for example:

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

Source: https://habr.com/ru/post/1486721/


All Articles