Usage
assert_engine(predicate, ..., msg, what = c("all", "any"),
na_ignore = FALSE, severity = c("stop", "warning", "message", "none"))
Arguments
predicate
Function that returns a logical value (possibly
a vector).
...
Passed to the predicate
function.
msg
The error message, in the event of failure.
what
Either 'all' or 'any', to reduce vectorised tests to a
single value.
na_ignore
A logical value. If FALSE
, NA
values
cause an error; otherwise they do not. Like na.rm
in many
stats package functions, except that the position of the failing
values does not change.
severity
How severe should the consequences of the assertion be?
Either "stop"
, "warning"
, "message"
, or "none"
.