R/utils.R

Defines functions is_online is_rcmd_check

is_rcmd_check <- function() {
  if (identical(Sys.getenv("NOT_CRAN"), "true")) {
    FALSE
  } else {
    Sys.getenv("_R_CHECK_PACKAGE_NAME_", "") != ""
  }
}

is_online <- function() {
  if (is_rcmd_check()) return(FALSE)
  tolower(Sys.getenv("R_OFFLINE")) != "true"
}

Try the rversions package in your browser

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

rversions documentation built on Aug. 31, 2022, 5:06 p.m.