Useful if you want to suppress cat, print, message and warning. You can choose what to mute. Default all four methods are muted.
quiet(x, print_cat = TRUE, message = TRUE, warning = TRUE)
x | function or expression or value assignment expression |
---|---|
print_cat | bool, mute |
message | bool, mute |
warning | bool, mute |
If your original functions has a return, it will return in
invisible(x)
quiet(warning(123)) quiet(message(123)) quiet(print(123)) quiet(cat(123)) quiet(warning(123), warning = FALSE) #> Warning: 123 quiet(message(123), message = FALSE) #> 123 quiet(print(123), print_cat = FALSE) #> [1] 123 quiet(cat(123), print_cat = FALSE) #> 123