R/warn_if_default.R

Defines functions warn_if_default

warn_if_default <- function(default) {
  if (!is.null(default) && !is.na(default)) {
    rlang::warn(
      paste(
        code("default"), "will have no effect if", code("preserve"),
        "is", code("TRUE")
      )
    )
  }
}

Try the incase package in your browser

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

incase documentation built on Jan. 16, 2021, 5:21 p.m.