R/hush.R

Defines functions hush

# Execute code silently
# Do not export to avoid conflict with modelsummary
hush <- function(code) {
    void <- utils::capture.output({
        out <- invisible(
            suppressMessages(
                suppressWarnings(
                    tryCatch(code, error = function(e) NULL))
            )
        )
    })
    return(out)
}

Try the marginaleffects package in your browser

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

marginaleffects documentation built on Oct. 20, 2023, 1:07 a.m.