R/zzz.R

Defines functions .onUnload .onLoad

################################################################################

.onLoad <- function(libname, pkgname) {
  options(
    bigreadr.nThread = max(parallelly::availableCores() - 1L, 1L)
  )
}

################################################################################

.onUnload <- function(libpath) {
  options(
    bigreadr.nThread = NULL
  )
}

################################################################################
privefl/bigreadr documentation built on Jan. 12, 2023, 10 a.m.