Skip to contents

If the expression in ... is not TRUE, warning is called, producing a warning message indicating the expression which was not true.

Usage

warnifnot(...)

Arguments

...

any R expression, which should evaluate to TRUE

Examples

warnifnot(TRUE)
warnifnot(FALSE)
#> Warning: FALSE is not TRUE
warnifnot(1 + 1 == 3)
#> Warning: FALSE is not TRUE