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"
}
r-hub/rversions documentation built on Sept. 1, 2022, 6:58 a.m.