R/zzz.R

Defines functions is_attached .onAttach

# Based on zzz.R from the tidyverse package

.onAttach <- function(...) {
  needed <- core[!is_attached(core)]
  if (length(needed) == 0) {
    return()
  }

  crayon::num_colors(TRUE)
  fpp3_attach()

  if (!"package:conflicted" %in% search()) {
    x <- fpp3_conflicts()
    msg(fpp3_conflict_message(x), startup = TRUE)
  }
}

is_attached <- function(x) {
  paste0("package:", x) %in% search()
}

Try the fpp3 package in your browser

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

fpp3 documentation built on Feb. 6, 2021, 9:14 a.m.