R/hush.R

Defines functions hush

Documented in hush

#' Execute code silently
#'
#' @keywords internal
hush <- function(code) {
    void <- utils::capture.output({
        out <- invisible(
            suppressMessages(
                suppressWarnings(
                    tryCatch(code, error = function(e) NULL))
            )
        )
    })
    return(out)
}
vincentarelbundock/gtsummary documentation built on Nov. 6, 2024, 11:07 p.m.