Simply wraps the given expression in tryCatch, invisible, capture.output, suppressMessages, suppressWarnings, and suppressPackageStartupMessages to suppress any possible console output.

suppressAll(expr)

Arguments

expr

Expression to be evaluated.

Examples

suppressAll({ stop("Some error") print("Some print") message("Some message") warning("Some warning") some_variable <- "test" return(some_variable) })