R/zzz.R

Defines functions .onLoad

 # nocov start
.onUnload <- function (libpath) {
  gc() # Force garbage collection of connections
  library.dynam.unload("odbc", libpath)
}

.onLoad <- function(libname, pkgname) {
  is_windows <- identical(.Platform$OS.type, "windows")

  # If TZDIR is not set we need to set it to R's timezone database on windows,
  # we can use the standard timezone database elsewhere.
  if (is_windows) {
    if (!nzchar(Sys.getenv("TZDIR"))) Sys.setenv("TZDIR" = file.path(R.home(), "share", "zoneinfo"))
  }
}

# nocov end

Try the odbc package in your browser

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

odbc documentation built on July 9, 2023, 7:04 p.m.