R/quiet.R

Defines functions quiet

Documented in quiet

#' Do something quietly
#' @description Internal helper function
#' used to prevent printed messages
#' @param x Code to be executed quietly
#' @keywords internal

quiet <- function(x) {
  sink(tempfile())
  on.exit(sink())
  force(x)
}

Try the traitstrap package in your browser

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

traitstrap documentation built on May 31, 2023, 7:59 p.m.