check

Check Package

Description

Runs R CMD build and R CMD check on the package.

Usage

1check(
2  path = ".",
3  args = c("--as-cran", "--no-manual"),
4  error_on = c("warning", "error", "note")
5)

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

1check()
2check(error_on = "error")  # Only fail on errors, not warnings
3check(args = c("--as-cran", "--no-manual"))