R/AAA.R

Defines functions .onAttach

# .RESEMBLE_CACHE <- new.env(FALSE, parent = globalenv())

.onAttach <- function(lib, pkg) {
  # assign("gpclib", FALSE, envir=.RESEMBLE_CACHE)
  #   pkg_v <- read.dcf(
  #   file = system.file("DESCRIPTION", package = pkg),
  #   fields = c("Version", "Config/VersionName", "URL")
  # )
  pkg_v <- pkg_info()

  mss <- paste0(
    "\033[34m",
    pkg, " version ",
    paste(pkg_v[1:2], collapse = " \U002D\U002D "),
    "\033[39m"
  )
  mss2 <- paste0(
    "\033[34mcheck the package repository at: ",
      pkg_v[, "URL"],
    "\033[39m"
  )
  packageStartupMessage(mss)
  packageStartupMessage(mss2)
}

# .onUnload <- function(libpath) {
#     rm(.RESEMBLE_CACHE)
# }

Try the resemble package in your browser

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

resemble documentation built on April 21, 2023, 1:13 a.m.