R/utils.R

Defines functions stop_if_no_aurin_api_userpwd has_aurin_api_userpwd

has_aurin_api_userpwd <- function() {
  Sys.getenv("AURIN_API_USERPWD") != ""
}

stop_if_no_aurin_api_userpwd <- function() {
  if (!has_aurin_api_userpwd()) {
    stop(
      "Sys.getenv('AURIN_API_USERPWD') has not been set. ",
      "Please use `aur_register()` to save your AURIN API key."
    )
  }
  return(invisible(NULL))
}

Try the aurin package in your browser

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

aurin documentation built on Feb. 1, 2022, 1:06 a.m.