Learn R Programming

lares (version 5.1.4)

warnifnot: Test the Truth of R Expressions and Warn

Description

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

Run this code
warnifnot(TRUE)
warnifnot(FALSE)
warnifnot(1 + 1 == 3)

Run the code above in your browser using DataLab