Search code examples
rdevtoolsr-package

What are the R CMD Check arguments?


Is there a comprehensive list somewhere of what you can pass to R CMD CHECK? I don't see anything in the manual but it's brutal to read. It'd be great if every line of this output could be run independently or if I could at least skip some things but I don't see a comprehensive list describing how to do this.

enter image description here

Even better would be something I could use like

check_dependencies()
check_executable_files()
check_hidden_files()

For context, I had a note about large file sizes that was hard to debug (it was plotly using it's full JS library in my vignettes) and devtools::check() took 3 minutes each time I ran it.


Solution

  • As rawr@ points out, the "official" answer is to run R CMD check --help, which will give the most accurate results for the version of R you are running.

    Still, it is surprisingly difficult to find this info online. It would be nice not to need the terminal to look this up... so I'm filing this answer with some pointers in the right direction for anyone else that manages to Google their way to this Q&A:

    1. This permalink highlights the documentation as of this writing, but that will stale as the function evolves.
    2. tools/R/check.R is the correct file at HEAD; search for "Usage <- function", where the contents of R CMD check --help are maintained. (in principle, this could also change, but this anchor has remained accurate for the entire 12-year history of the R implementation of R CMD check)