R/hush.R

Defines functions hush

# Execute code silently
# Do not export to avoid conflict with modelsummary
hush <- function(code) {
    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 Sept. 13, 2025, 5:07 p.m.