R/shhh.R

Defines functions shhh

Documented in shhh

#' execute expression quietly
#'
#' @param expr Expression to be evaluated without additional printing.
#' @return Output from evaluated expression.
#' @export
shhh <- function(expr) {
  sh <- utils::capture.output(x <- suppressPackageStartupMessages(
    suppressMessages(suppressWarnings(expr))))
  invisible(x)
}

Try the tfse package in your browser

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

tfse documentation built on May 2, 2019, 11:28 a.m.