R/stop_quietly.R

Defines functions stop_quietly

Documented in stop_quietly

#' Function to stop an R session without an error. 
#' 
#' @author Stuart K. Grange
#' 
#' @return Invisible, the R session will be stopped.
#' 
#' @export
stop_quietly <- function() {
  
  opt <- options(show.error.messages = FALSE)
  on.exit(options(opt))
  stop()
  
}
skgrange/systemr documentation built on April 18, 2024, 2:23 a.m.