check automatically builds and checks a source package, using all
known best practices.
check_built checks an already built package.
check( pkg = ".", document = NULL, build_args = NULL, ..., manual = FALSE, cran = TRUE, remote = FALSE, incoming = remote, force_suggests = FALSE, run_dont_test = FALSE, args = "--timings", env_vars = c(NOT_CRAN = "true"), quiet = FALSE, check_dir = tempdir(), cleanup = TRUE, vignettes = TRUE, error_on = c("never", "error", "warning", "note") ) check_built( path = NULL, cran = TRUE, remote = FALSE, incoming = remote, force_suggests = FALSE, run_dont_test = FALSE, manual = FALSE, args = "--timings", env_vars = NULL, check_dir = tempdir(), quiet = FALSE, error_on = c("never", "error", "warning", "note") )
The package to use, can be a file path to the package or a
package object. See
By default (
Additional arguments passed to
Additional arguments passed on to
Character vector of arguments to pass to
Environment variables set during
the directory in which the package is checked
Whether to throw an error on
Path to built package.
An object containing errors, warnings, and notes.
R CMD check is essential if you want to submit your package
to CRAN: you must not have any 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 or WARNINGs: these typically
represent serious problems.
check automatically builds a package before calling
as 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.
Devtools does its best to set up an environment that combines best practices with how check works on CRAN. This includes:
The standard environment variables set by devtools:
r_env_vars(). Of particular note for package tests is the
NOT_CRAN env var which lets you know that your tests are not
running on CRAN, and hence can take a reasonable amount of time.
Debugging flags for the compiler, set by
aspell is found
is set to
TRUE. If no spell checker is installed, a warning is
env vars set by arguments
release() if you want to send the checked package to