Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

check_for_cran

Check an R-package on R-hub, for a CRAN submission


Description

This function calls check() with arguments and platforms, that are suggested for a CRAN submission.

Usage

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, ...)

Arguments

path

Path to a directory containing an R package, or path to source R package tarball built with R CMD build or devtools::build().

email

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.

check_args

Arguments for R CMD check. By default --as-cran is used.

env_vars

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.

platforms

Character vector of platform ids to use (see platforms()), or NULL. If NULL, then a set of default platforms will be selected, see below.

...

Additional arguments are passed to check().

Details

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.

Value

An rhub_check object.

Examples

## Not run: 
ch <- check_for_cran("package", show_status = FALSE)
ch$update()
ch$livelog(3)

## End(Not run)

rhub

Connect to 'R-hub'

v1.1.1
MIT + file LICENSE
Authors
Gábor Csárdi [aut, cre], Maëlle Salmon [aut] (<https://orcid.org/0000-0002-2815-0399>), R Consortium [fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.