Aliases for base::suppressMessages()
and base::suppressWarnings()
Examples
# load function
foo <- function(...) {
message("You entered :", paste0(...))
c(...)
}
# wrap around function or muffle the function ti's
muffle(foo(1, 2))
#> [1] 1 2
muffle(fun = foo)(1, 2)
#> [1] 1 2
sapply(1:3, muffle(fun = foo))
#> [1] 1 2 3
# silence warnings
wuffle(as.integer("a"))
#> [1] NA
sapply(list(1, "a", "0", ".2"), wuffle(fun = as.integer))
#> [1] 1 NA 0 0