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"))
source share