stopifnot | R Documentation |
This function is identical to base R's stopifnot
,
but it includes logging of the exception message via loggit()
.
stopifnot(..., exprs, exprObject, local, .loggit = NA, echo = get_echo())
... , exprs |
any number of { expr1 expr2 .... } Note that e.g., positive numbers are not |
exprObject |
alternative to |
local |
(only when |
.loggit |
Should the condition message be added to the log?
If |
echo |
Should the log entry (json) be echoed to |
Other handlers:
debuginfo()
,
message()
,
stop()
,
warning()
## Not run:
stopifnot("This is a completely false condition" = FALSE)
stopifnot(5L == 5L, "This is a completely false condition" = FALSE, echo = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.