R/zzz.R

Defines functions .onAttach strict_deactivate strict_activate

Documented in strict_activate strict_deactivate

.onAttach <- function(...) {
  options(
    warnPartialMatchArgs = TRUE,
    warnPartialMatchAttr = TRUE,
    warnPartialMatchDollar = TRUE
  )

  strict_activate()
}

#' Manually activate and deactive strict mode
#'
#' For experts only.
#'
#' @keywords internal
#' @export
strict_deactivate <- function() {
  remove_shims()
  remove_conflicts()
}

#' @export
#' @rdname strict_deactivate
strict_activate <- function() {
  register_shims()
  register_conflicts()
}
hadley/strict documentation built on May 27, 2019, 7:26 a.m.