### Install rcmdcheck Package Source: https://r-lib.github.io/rcmdcheck Install the rcmdcheck package from CRAN. ```r install.packages("rcmdcheck") ``` -------------------------------- ### Get CRAN Check Flavors Source: https://r-lib.github.io/rcmdcheck Downloads the names of available CRAN platforms for package checks. Use this to understand the environments for which checks are performed. ```r cran_check_flavours() ``` -------------------------------- ### Run R CMD check on a Package Source: https://r-lib.github.io/rcmdcheck Run R CMD check on a source R package tarball or a folder containing an R package. Set `quiet = FALSE` to display output during the check. ```r library(rcmdcheck) rcmdcheck("path/to/R/package") ``` -------------------------------- ### Load CRAN Check Results for a Package Source: https://r-lib.github.io/rcmdcheck Loads and parses all R CMD check results for a specified package across various CRAN flavors. This provides detailed information on errors, warnings, and notes for each platform. ```r cran_check_results("igraph") ``` -------------------------------- ### Compare R CMD check to CRAN Source: https://r-lib.github.io/rcmdcheck Compares the results of a local R CMD check with the official CRAN checks for the same package. This is useful for identifying discrepancies introduced in local development. ```R chk <- rcmdcheck(quiet = TRUE) compare_to_cran(chk) #> ── R CMD check comparison ────────────────────────────────────────────────────────────── rcmdcheck 1.3.3 / 1.3.3.9000 ──── #> Status: OK #> #> ── Fixed #> #> ✔ checking LazyData ... NOTE #> ✔ checking LazyData ... NOTE #> ✔ checking LazyData ... NOTE #> ✔ checking LazyData ... NOTE #> ✔ checking LazyData ... NOTE #> ✔ checking LazyData ... NOTE ``` -------------------------------- ### Capture and Display R CMD check Results Source: https://r-lib.github.io/rcmdcheck Execute R CMD check on a package and capture the results in an `rcmdcheck` object. The object can be printed to display a summary of the check, including errors, warnings, and notes. ```r library(rcmdcheck) chk <- rcmdcheck("tests/testthat/bad1", quiet = TRUE) chk ``` -------------------------------- ### Extract Details from R CMD check Results Source: https://r-lib.github.io/rcmdcheck Use `check_details()` to convert the `rcmdcheck` object into a list containing specific details about the package check, such as package name, version, errors, warnings, notes, and session information. ```r names(check_details(chk)) ``` -------------------------------- ### Run R CMD check in Background Source: https://r-lib.github.io/rcmdcheck Initiates an R CMD check process in the background using rcmdcheck_process, which is a subclass of processx::process. This allows for concurrent checks and programmatic control over the process. ```R chkpx <- rcmdcheck_process$new() chkpx #> PROCESS 'R', running, pid 82576. ``` -------------------------------- ### Wait for and Parse Background Check Results Source: https://r-lib.github.io/rcmdcheck Waits for a background R CMD check process to complete and then parses its results. This is used after initiating a check with rcmdcheck_process$new(). ```R chkpx$wait() chkpx$parse_results() #> ── R CMD check results ───────────────────────────────────────────────────────────────────────── rcmdcheck 1.3.3.9000 ──── #> Duration: 23.6s #> #> 0 errors ✔ | 0 warnings ✔ | 0 notes ✔ ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.