R/onAttach.R

Defines functions .onAttach

.onAttach <- function(libname, pkgname) {
  
  v <- tcplConfList()
  p <- names(v)
  pn <- sapply(p, nchar)
  sep <- sapply(pn, function(x) paste(rep(" ", 11 - x), collapse = ""))
  sep <- paste0(":", sep)
  cs <- sapply(seq_along(v), function(x) paste(p[x], v[[x]], sep = sep[x]))
  
  packageStartupMessage("tcpl (v", as.character(utils::packageVersion("tcpl")), 
                        ") loaded with the following settings:\n  ",
                        paste(cs, collapse = "\n  "),
                        "\nDefault settings stored in tcpl config file. See ", 
                        "?tcplConf for more information.")
  
}

Try the tcpl package in your browser

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

tcpl documentation built on Oct. 7, 2023, 1:06 a.m.