stopif | R Documentation |
The stopif()
function stops the execution if the condition is TRUE
. It is the opposite of
stopifnot()
, which stops if the condition is not TRUE
. This function is useful to increase
clarity in the code by removing double negations.
stopif(...)
... |
Logical conditions to be checked. Each condition must evaluate to a logical vector. Default: none. Named arguments will be used as error messages. |
The function stops execution if any condition evaluates to TRUE
.
stopif(6 < 4, 6 > 5)
stopif("custom message" = 6 > 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.