R/zzz.R

Defines functions .onAttach .onLoad

## set default options for faux_options:
.onLoad <- function(libname, pkgname) {
  op <- options()
  op.faux <- list(
    faux.connection = stdin(),
    faux.sep = "_",
    faux.plot = TRUE,
    faux.verbose = TRUE
  )
  toset <- !(names(op.faux) %in% names(op))
  if(any(toset)) options(op.faux[toset])
  
  invisible()
}

.onAttach <- function(libname, pkgname) {
  paste(
    "\n************",
    "Welcome to faux. For support and examples visit:",
    "https://debruine.github.io/faux/",
    "- Get and set global package options with: faux_options()",
    "************",
    sep = "\n"
  ) %>% packageStartupMessage()
}

Try the faux package in your browser

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

faux documentation built on April 20, 2023, 9:13 a.m.