Invokes R CMD check with the env vars and options used by CRAN's incoming-pretest scripts, so local checks match CRAN as closely as possible. Wraps check_as_cran().

audit_check(
  pkg = ".",
  check_output = file.path(dirname(normalizePath(pkg, mustWork = FALSE)), "check"),
  scratch = tempfile("scratch_dir"),
  Ncpus = 1,
  as_command = FALSE,
  clean_before = TRUE,
  open = FALSE,
  repos = getOption("repos")
)

Arguments

pkg

Path to the package to check.

check_output

Where to store check outputs.

scratch

Where to store temporary files.

Ncpus

Number of CPUs.

as_command

Run as Linux command line instead of in R. Currently a no-op: the as_command = TRUE branch only sets a local variable and returns invisibly without invoking the check. Keep FALSE (default) until that branch is implemented.

clean_before

Wipe check_output before running.

open

Open the check directory at the end.

repos

Repositories used for dependency resolution.

Value

The rcmdcheck results object.

See also

Examples

if (FALSE) { # \dontrun{
audit_check(".")
} # }