R/zzz.R

Defines functions .onAttach is_attached

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

  crayon::num_colors(TRUE)
  rmd_attach()

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

}

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

Try the rmd package in your browser

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

rmd documentation built on March 1, 2020, 5:07 p.m.