R/utils.R

Defines functions stop_quietly passthrough

# a function that simply returns its argument
passthrough <- function(x) x

# a function that stops without creating an error message
stop_quietly <- function() {
  opt <- options(show.error.messages = FALSE)
  on.exit(options(opt))
  stop()
}
clauswilke/colorblindr documentation built on July 29, 2023, 2:17 p.m.