powered by
lifecycle::badge("experimental")
Run expression wrapped in both suppressMessages() and suppressWarnings().
suppressMessages()
suppressWarnings()
suppress_mw(expr)
The output of expr.
expr
Any expression to run within suppressMessages() and suppressWarnings().
Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk
suppressWarnings(suppressMessages(expr))
# Attach packages library(xpectr) fn <- function(a, b){ warning("a warning") message("a message") a + b } suppress_mw(fn(1, 5))
Run the code above in your browser using DataLab