R/nu-global.R

Defines functions printBaseUrl .onAttach

# Set the base url for the NEON API

nu.globals <- new.env()

.onAttach <- function(libname, pkgname) {
  
  nu.globals$baseurl <- Sys.getenv("NEON_API_URL")
  if(nu.globals$baseurl=="") {
    nu.globals$baseurl <- "https://data.neonscience.org/api/v0/"
  }
  
}


# print the base url for the NEON API

printBaseUrl <- function() {
  
  print(nu.globals$baseurl)
  
}

Try the neonUtilities package in your browser

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

neonUtilities documentation built on Sept. 10, 2026, 1:06 a.m.