check_as_cran {checkhelper} | R Documentation |
Check your package with real CRAN default environment variables and check strategy
Description
Usage
check_as_cran(
pkg = ".",
check_output = tempfile("check_output"),
scratch = tempfile("scratch_dir"),
Ncpus = 1,
as_command = FALSE,
clean_before = TRUE,
open = FALSE
)
Arguments
pkg |
pkg directory to check |
check_output |
Where to store check outputs. Default is a temporary directory |
scratch |
Where to store temporary files (cleaned after). Default is another temporary directory |
Ncpus |
Number of CPU used to build the package |
as_command |
Whether to run the check as Linux command line, instead of directly in R |
clean_before |
Whether to delete the previous check_output |
open |
Whether to open the check dir at the end of the process |
Details
When you send your package on CRAN, there are multiple options set before running the checks.
Here we use the CRAN settings and way of managing incoming packages used for Linux in this function check_as_cran()
.
Scripts and options used are directly issued from the GitHub mirror repository of the CRAN machines: https://github.com/r-devel/r-dev-web/tree/master/CRAN/.
Although check_as_cran()
should run on any OS, it will run CRAN parameters originally set up for Linux machines.
In the check_output
, you will get the same outputs, in the same format as used by CRAN, for the pre-test of incoming packages.
Value
An object containing errors, warnings, and notes.
References
https://github.com/r-devel/r-dev-web/tree/master/CRAN/
Examples
## Not run:
# This runs a check of the current package
# Directory to store the check outputs
check_output <- tempfile("example")
# Check the current package
check_as_cran(check_output = check_output)
# Open directory with all outputs
utils::browseURL(check_output)
## End(Not run)