R/zzz.R

Defines functions .onAttach

# eiballots/R/zzz.R
# Package hooks: startup message about data source

.onAttach <- function(libname, pkgname) {
  src <- getOption("data_dir")
  if (is.null(src)) {
    packageStartupMessage(
      "eiballots: data will be loaded from OSF (online mode).\n",
      "  To work with local data files, run:\n",
      "  options(data_dir = \"/path/to/your/data/\")"
    )
  } else {
    packageStartupMessage(
      sprintf("eiballots: using local data directory '%s'.", src)
    )
  }
}

Try the eiballots package in your browser

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

eiballots documentation built on Sept. 26, 2026, 5:06 p.m.