inst/templates/zzz.R

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

  crayon::num_colors(TRUE)
  personalr_to_replace_attach()

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

  msg(cli::rule(right = crayon::bold("Ready to go!")),startup = TRUE)

}

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

Try the personalr package in your browser

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

personalr documentation built on Aug. 12, 2022, 1:07 a.m.