R: Run R CMD check from R and Capture Results

rcmdcheck {rcmdcheck} | R Documentation

## Run R CMD check from R and Capture Results

### Description

Run R CMD check form R programatically, and capture the results of the individual checks.

### Usage

    rcmdcheck(path = ".", quiet = FALSE, args = character(),
      build_args = character(), check_dir = NULL, libpath = .libPaths(),
      repos = getOption("repos"), timeout = Inf, error_on = c("never",
      "error", "warning", "note"))

### Arguments

`path` | Path to a package tarball or a directory.
`quiet` | Whether to print check output during checking.
`args` | Character vector of arguments to pass to `R CMD check`. (Note that instead of the `--output` option you should use the `check_dir` argument, because `--output` cannot deal with spaces and other special characters on Windows.
`build_args` | Character vector of arguments to pass to `R CMD build`
`check_dir` | Path to a directory where the check is performed. If this is not `NULL`, then the a temporary directory is used, that is cleaned up when the returned object is garbage collected.
`libpath` | The library path to set for the check. The default uses the current library path.
`repos` | The `repos` option to set for the check. This is needed for cyclic dependency checks if you use the `--as-cran` argument. The default uses the current value.
`timeout` | Timeout for the check, in seconds, or as a base::difftime object. If it is not finished before this, it will be killed. `Inf` means no timeout. If the check is timed out, that is added as an extra error to the result object.
`error_on` | Whether to throw an error on `R CMD check` failures. Note that the check is always completed (unless a timeout happens), and the error is only thrown after completion. If `"never"`, then no errors are thrown. If `"error"`, then only `ERROR` failures generate errors. If `"warning"`, then `WARNING` failures generate errors as well. If `"note"`, then any check failure generated an error.

### Value

An S3 object (list) with fields `errors`, `warnings` and `notes`. These are all character vectors containing the output for the failed check.

[Package rcmdcheck version 1.3.0 Index]