R/zzz.R

Defines functions .onAttach

###
.onAttach <- function(libname, pkgname) {
  desc_file <- system.file("DESCRIPTION", package = pkgname)
  if (file.exists(desc_file)) {
    build_date <- file.info(desc_file)$mtime
    packageStartupMessage(
      sprintf(
        "tidycensuskr %s (%s)
Please install the companion data package tidycensuskr.sf to use the district boundaries.
install.packages('tidycensuskr.sf', repos = 'https://sigmafelix.r-universe.dev')\n",
        utils::packageVersion(pkgname),
        format(build_date, "%Y-%m-%d")
      )
    )
  }
}

Try the tidycensuskr package in your browser

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

tidycensuskr documentation built on May 4, 2026, 9:09 a.m.