R/onload.R

Defines functions .onLoad

# onload.R

.onLoad <- function(libname, pkgname) {
  op <- options()
  op.gcamdata <- list(
    gcamdata.use_java = TRUE
  )
  if(Sys.getenv("GCAMDATA_USE_JAVA") != "") {
    op.gcamdata[["gcamdata.use_java"]] <- isTRUE(as.logical(Sys.getenv("GCAMDATA_USE_JAVA")))
  }
  toset <- !(names(op.gcamdata) %in% names(op))
  if(any(toset)) {
    options(op.gcamdata[toset])
  }
  invisible()
}
rohmin9122/gcam-korea-release documentation built on Nov. 26, 2020, 8:11 a.m.