devtools (version 1.5)

check_cran: Check a package from CRAN.

Description

This is useful for automatically checking that dependencies of your packages work.

Usage

check_cran(pkgs, libpath = file.path(tempdir(), "R-lib"), srcpath = libpath,
  bioconductor = FALSE, type = getOption("pkgType"),
  threads = getOption("Ncpus", 1), check_dir = tempfile("check_cran"))

Arguments

pkgs
Vector of package names - note that unlike other devtools functions this is the name of a CRAN package, not a path.
libpath
path to library to store dependencies packages - if you you're doing this a lot it's a good idea to pick a directory and stick with it so you don't have to download all the packages every time.
srcpath
path to directory to store source versions of dependent packages - again, this saves a lot of time because you don't need to redownload the packages every time you run the package.
bioconductor
include bioconductor packages in checking?
type
binary package type of test
threads
number of concurrent threads to use for checking. It defaults to the option "Ncpus" or 1 if unset.
check_dir
the directory in which the package is checked

Value

  • invisible TRUE if successful and no ERRORs or WARNINGS,

Details

This function does not clean up after itself, but does work in a session-specific temporary directory, so all files will be removed when your current R session ends.

Examples

Run this code
dep <- revdep("ggplot2")
check_cran(dep, "~/documents/ggplot/ggplot-check")
# Or, equivalently:
revdep_check("ggplot2")

Run the code above in your browser using DataCamp Workspace