R/zzz.R

Defines functions onUnload onAttach

# 
# This is what is going to run 
# 
# 
# 
.onAttach <- function(libname, pkgname){
  if ( is.null( getOption("spw.threads") ) ) { 
    options(spw.threads = 1)
  }
  
  packageStartupMessage("This is spatialwarnings ", 
                        utils::packageDescription("spatialwarnings", 
                                                  fields = "Version"), 
                        appendLF = TRUE)
  packageStartupMessage("Use options(mc.cores = <n>) to set up multi-core processing (unix only)")
}


.onUnload <- function(libpath) { 
  options(spw.threads = NULL)
}

Try the spatialwarnings package in your browser

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

spatialwarnings documentation built on Jan. 27, 2018, 3:01 a.m.