R/zzz.R

Defines functions quickstart .onAttach

.onAttach <- function(...) {
  attached <- coursekata_attach(
    do_not_ask = !interactive() || interactive() && quickstart(),
    quietly = getOption("coursekata.quiet", FALSE) || quickstart()
  )

  coursekata_load_theme()
  if (!quickstart()) {
    rlang::inform(coursekata_attach_message(attached), class = "packageStartupMessage")
  }
}

quickstart <- function() {
  getOption("coursekata.quickstart", FALSE) ||
    !interactive() && identical(Sys.getenv("DEVTOOLS_LOAD"), "coursekata")
}

Try the coursekata package in your browser

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

coursekata documentation built on Sept. 11, 2024, 8:42 p.m.