inst/source/R/is_r_cmd_check.R

#' Is the Current R Process an \command{R CMD check}?
#'
#' Check for system variables to guess whether or not this is an
#' \command{R CMD check}.
#' @export
#' @family logical helpers
#' @family test helpers
#' @template return_boolean
is_r_cmd_check <- function() {
    is_r_cmd_check <- ("CheckExEnv" %in% search()) ||
        any(c("_R_CHECK_TIMINGS_", "_R_CHECK_LICENSE_") %in%
            names(Sys.getenv()))
    return(is_r_cmd_check)
}

Try the fritools2 package in your browser

Any scripts or data that you put into this service are public.

fritools2 documentation built on July 9, 2023, 7:07 p.m.