R/AAA.R

Defines functions is_dataRetrieval_user .onLoad

Documented in is_dataRetrieval_user

pkg.env <- new.env()

.onLoad = function(libname, pkgname){
    suppressMessages(setAccess('public'))
    pkg.env$nldi_base <- "https://labs.waterdata.usgs.gov/api/nldi/linked-data/"
    pkg.env$local_sf <- requireNamespace("sf", quietly = TRUE)
}


#' Is this a dataRetrieval user
#' 
#' Reveals if this is a user or not
#' @export
#' @examples 
#' is_dataRetrieval_user()
is_dataRetrieval_user <- function(){
  interactive() ||
    !identical(Sys.getenv("CI"), "") ||
    identical(Sys.getenv("NOT_CRAN"), "true")
}

Try the dataRetrieval package in your browser

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

dataRetrieval documentation built on Sept. 14, 2021, 5:16 p.m.