R/zzz.R

Defines functions .onLoad .onAttach

.onAttach <- function(libname, pkgname){

  # startup message ---------------------------------------------------------
  pkg.version <- packageDescription("adegenet", fields = "Version")
  startup.txt <- paste("\n   /// adegenet ", pkg.version, " is loaded ////////////",
                       "\n\n   > overview: '?adegenet'",
                       "\n   > tutorials/doc/questions: 'adegenetWeb()' ",
                       "\n   > bug reports/feature requests: adegenetIssues()\n\n", sep="")
  packageStartupMessage(startup.txt)
}

.onLoad <- function(...) {
  # adegenet specific options -----------------------------------------------
  op <- options()
  op.adegenet <- list(
    adegenet.testcon = stdin(), # for readLines, read from stdin. This allows it to be changed for tests.
    adegenet.check.ploidy = TRUE
  )
  toset <- !(names(op.adegenet) %in% names(op))
  if(any(toset)) options(op.adegenet[toset])
}

Try the adegenet package in your browser

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

adegenet documentation built on Feb. 16, 2023, 6 p.m.