Run R CMD check form R programatically, and capture the results of the individual checks.
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"))
Path to a package tarball or a directory.
Whether to print check output during checking.
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.
Character vector of arguments to pass to
R CMD build
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.
The library path to set for the check. The default uses the current library path.
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 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.
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.
An S3 object (list) with fields errors
,
warnings
and notes
. These are all character
vectors containing the output for the failed check.