warnif | R Documentation |
The warnif()
function issues a warning if the condition is TRUE
. It is the opposite of
warnifnot()
, which warns if the condition is not TRUE
. This function is useful for issuing
warnings when a certain condition is met.
warnif(...)
... |
Logical conditions to be checked. Each condition must evaluate to a logical vector. Named arguments will use the name as the warning message. |
The function returns invisible()
, but issues warnings for each condition that evaluates
to TRUE
.
warnif(6 > 4, 6 > 5)
warnif("custom message" = 6 > 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.