check
automatically builds and checks a source package, using all
known best practices. check_built
checks an already built package.check(pkg = ".", document = TRUE, build_args = NULL, ...,
manual = FALSE, cran = TRUE, check_version = FALSE,
force_suggests = FALSE, run_dont_test = FALSE, args = NULL,
env_vars = NULL, quiet = FALSE, check_dir = tempdir(), cleanup = TRUE)check_built(path = NULL, cran = TRUE, check_version = FALSE,
force_suggests = FALSE, run_dont_test = FALSE, manual = FALSE,
args = NULL, env_vars = NULL, check_dir = tempdir(), quiet = FALSE)
as.package
for more informationTRUE
(the default), will update and check
documentation before running formal check.R CMD build
build()
.FALSE
, don't build and check manual
(--no-manual
).TRUE
(the default), check using the same settings as
CRAN uses._R_CHECK_CRAN_INCOMING_
env var.
If TRUE
, performns a number of checked related
to version numbers of packages on CRAN._R_CHECK_FORCE_SUGGESTS_
. If
FALSE
(the default), check will proceed even if all suggested
packages aren't found.--run-donttest
so that tests surrounded in
\dontest{}
are also tested. This is important for CRAN
submission.R CMD check
R CMD check
TRUE
suppresses output from this function.r_env_vars
. Of particular note for package tests is theNOT_CRAN
env var which lets you know that your tests are not
running on cran, and hence can take a reasonable amount of time.compiler_flags(FALSE)
.aspell
is found_R_CHECK_CRAN_INCOMING_USE_ASPELL_
is set toTRUE
. If no spell checker is installed, a warning is
issued.)check_version
andforce_suggests
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 check_built
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.
release
if you want to send the checked package to
CRAN.