R/zzz.R

Defines functions .onLoad

.onLoad <- function(libname, pkgname) {
  mran.url <- if (getRversion() >= "3.2.2") {
    "https://mran.microsoft.com" ## use HTTPS
  } else {
    "http://mran.microsoft.com" ## use HTTP
  }

  ## set options using the approach used by devtools
  opts <- options()
  opts.miniCRAN <- list(
    minicran.mran = mran.url
  )
  toset <- !(names(opts.miniCRAN) %in% names(opts))
  if (any(toset)) options(opts.miniCRAN[toset])

  invisible()
}

Try the miniCRAN package in your browser

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

miniCRAN documentation built on March 18, 2022, 6:29 p.m.