checkautomatically builds and checks a source package, using all know best practices. Passing
R CMD checkis essential if you want to submit your package to CRAN: you must not have an ERRORs or WARNINGs, and you want to ensure that there are as few NOTEs as possible. If you are not submitting to CRAN, at least ensure that there are no ERRORs: these typically represent serious problems.
check(pkg = ".", document = TRUE, doc_clean = getOption("devtools.cleandoc"), cleanup = TRUE, cran = TRUE, check_version = FALSE, force_suggests = TRUE, args = NULL, build_args = NULL, quiet = FALSE)
as.packagefor more information
TRUE(the default), will update and check documentation before running formal check.
TRUEthe check directory is removed if the check is successful - this allows you to inspect the results to figure out what went wrong. If
FALSEthe check directory is never removed.
TRUE(the default), check using the same settings as CRAN uses.
TRUE, will delete all files in the
mandirectory and regenerate them from scratch with roxygen. The default is to use the value of the
TRUE, check that the new version is greater than the current version on CRAN, by setting the
_R_CHECK_CRAN_INCOMING_environment variable to
FALSE, don't force suggested packages, by setting the
_R_CHECK_FORCE_SUGGESTS_environment variable to
TRUEsuppresses output from this function.
r_env_vars. Of particular note for package tests is the
NOT_CRANenv var which lets you know that your tests are not running on cran, and hence can take a reasonable amount of time.
cran_env_vars. Unforutnately exactly what CRAN does when checking a package is not publicly documented, but we do our best to simulate as accurately as possible given what we know.
R CMD checkdoes not - these are typically things that the CRAN maintainers will complain about if you haven't done, but haven't yet included in the formal testing process. These are run after
R CMD check
There is currently one test that checks you haven't includes any non-standard directories in the top-level R file.
checkautomatically builds a package before using
R CMD checkas this is the recommended way to check packages. Note that this process runs in an independent realisation of R, so nothing in your current workspace will affect the process.
releaseif you want to send the checked package to CRAN.