R/zzz.R

Defines functions .onUnload .onLoad

# nocov start
.onLoad <- function(libname, pkgname) {
  if (is.null(getOption("hutilscpp.nThread"))) {
    options("hutilscpp.nThread" = 1L)
  }
  if (is.double(nThread <- getOption("hutilscpp.nThread"))) {
    options("hutilscpp.nThread" = as.integer(nThread))
  }

  invisible(NULL)
}

.onUnload <- function(libpath) {
  library.dynam.unload("hutilscpp", libpath)
}
# nocov end

Try the hutilscpp package in your browser

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

hutilscpp documentation built on Oct. 11, 2023, 9:06 a.m.