R/zzz.R

Defines functions .onLoad

# nocov start
.onLoad <- function(libname, pkgname) {
  op <- options()
  op.testdat <- list(
    testdat.miss = c(NA, ""),
    testdat.miss_text = c("error", "null", "0", ".", "-", ",", "na", "#n/a", "", NA),
    testdat.stop_on_fail = TRUE,
    testdat.scipen = 999
  )
  toset <- !(names(op.testdat) %in% names(op))
  if (any(toset)) options(op.testdat[toset])

  invisible()
}
# nocov end

Try the testdat package in your browser

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

testdat documentation built on Sept. 4, 2023, 1:06 a.m.