Check Package
Description
Runs R CMD build and R CMD check on the package.
Usage
check(
path = ".",
args = c("--as-cran", "--no-manual"),
error_on = c("warning", "error", "note")
)
Arguments
path: Path to package root directory.args: Character vector of additional arguments to pass to R CMD check. Default includes “–as-cran” and “–no-manual”.error_on: Severity level that causes an error: “error”, “warning”, or “note”. Default is “warning” (fails on errors or warnings).
Value
TRUE if check passes, FALSE otherwise (invisibly). Also throws an error if check fails at or above error_on level.
Examples
check()
check(error_on = "error") # Only fail on errors, not warnings
check(args = c("--as-cran", "--no-manual"))