R/zzz.R

Defines functions .onUnload .onAttach .onLoad

.onLoad <- function(...) {
  has_moved <<- memoise::memoise(has_moved)
}

.onAttach <- function(...) {
  conflicts_register()
}

# This should really be done on .onDetach(), but because it's called inside of
# detach() it messes up the computation of `pos` inside of `detach()` and it
# detaches the wrong environment
.onUnload <- function(...) {
  conflicts_reset()
}

Try the conflicted package in your browser

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

conflicted documentation built on Nov. 27, 2021, 1:06 a.m.