This function calls check() with arguments and platforms, that
are suggested for a CRAN submission.
check_for_cran(
path = ".",
email = NULL,
check_args = "--as-cran",
env_vars = c(`_R_CHECK_FORCE_SUGGESTS_` = "true", `_R_CHECK_CRAN_INCOMING_USE_ASPELL_`
= "true"),
platforms = NULL,
...
)An rhub_check object.
Path to a directory containing an R package, or path to
source R package tarball built with R CMD build or
devtools::build().
Email address to send notification to about the check.
It must be a validated email address, see validate_email(). If
NULL, then the email address of the maintainer is used, as defined
in the DESCRIPTION file of the package.
Arguments for R CMD check. By default --as-cran
is used.
Character vecctor of environment variables to set on the builder.
By default _R_CHECK_FORCE_SUGGESTS_="true" is set, to require all packages used.
_R_CHECK_CRAN_INCOMING_USE_ASPELL_="true" is also set, to use the
spell checker.
A character vector of one or more platforms to build/check
the package on. See platforms() for the available platforms. If this is
NULL, and the R session is interactive, then a menu is shown. If it
is NULL, and the session is not interactive, then the default R-hub
platforms are used. A vector of platforms which saves time by building one
R package tarball that is used for all the platforms specified.
Additional arguments are passed to check().
In particular, if platforms is NULL (the default), then
It checks the package on Windows, and Linux.
It checks the package on R-release and R-devel.
It uses the --as-cran argument to R CMD check.
It requires all dependencies, including suggested ones.
This function is wrapped by devtools::check_rhub() which you
might find useful if you load devtools via your .Rprofile (see usethis::use_devtools()).
if (FALSE) {
ch <- check_for_cran("package", show_status = FALSE)
ch$update()
ch$livelog(3)
}
Run the code above in your browser using DataLab