R/zzz.R

Defines functions .onLoad .onAttach

.onAttach <- function(libname, pkgname) {
  options(rgee.print.option = "simply")
}

.onLoad <- function(libname, pkgname) {
  # # if EARTHENGINE_PYTHON is defined then forward it to RETICULATE_PYTHON
  # earthengine_python <- Sys.getenv("EARTHENGINE_PYTHON", unset = NA)
  # if (!is.na(earthengine_python))
  #   Sys.setenv(RETICULATE_PYTHON = earthengine_python)

  # delay load earthengine-api
  ee <<- reticulate::import("ee", delay_load = list(priority = 30))
}
r-spatial/rgee documentation built on July 4, 2024, 9:33 a.m.