quiet: Suppress cat, print, message and warning

Description Usage Arguments Value Examples

Description

Useful if you want to suppress cat, print, message and warning. You can choose what to mute. Default all four methods are muted.

Usage

1
quiet(x, print_cat = TRUE, message = TRUE, warning = TRUE)

Arguments

x

function or expression or value assignment expression

print_cat

bool, mute print and cat?

message

bool, mute messages?

warning

bool, mute warnings?

Value

If your original functions has a return, it will return in invisible(x)

Examples

1
2
3
4
5
6
7
8
quiet(warning(123))
quiet(message(123))
quiet(print(123))
quiet(cat(123))
quiet(warning(123), warning = FALSE)
quiet(message(123), message = FALSE)
quiet(print(123), print_cat = FALSE)
quiet(cat(123), print_cat = FALSE)

spsUtil documentation built on Oct. 31, 2021, 1:06 a.m.