Description Usage Arguments Details Value Examples
Similar to base::stopifnot, but allows you to use a custom message and
logger level. If all conditions are TRUE, silently exit.
1 2 3 4 5 6 7 8 9  | severeifnot(msg, ...)
errorifnot(msg, ...)
warnifnot(msg, ...)
infoifnot(msg, ...)
debugifnot(msg, ...)
 | 
msg | 
 Logger message to write, as a single character string.  | 
... | 
 Conditions to evaluate  | 
Conditions can be vectorized, or can return non-logical values.The
underlying function automatically applies isTRUE(all(.)) to the
conditions.
Invisibly, TRUE if conditions are met, FALSE otherwise
1 2 3 4 5 6 7 8 9  | a <- 1:5
b <- list(6, 7, 8)
debugifnot("By the way, something is not a list.", is.list(a), is.list(b))
infoifnot("Something is not a list.", is.list(a), is.list(b))
warnifnot("I would prefer it if you used lists.", is.list(a), is.list(b))
errorifnot("You should definitely use lists.", is.list(a), is.list(b))
try({
  severeifnot("I absolutely cannot deal with the fact that something is not a list.", is.list(a), is.list(b))
})
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.