| assert_is_all_of {assertive.types} | R Documentation |
Checks to see if x belongs to any of the classes in classes.
assert_is_all_of(x, classes, severity = getOption("assertive.severity",
"stop"))
assert_is_any_of(x, classes, severity = getOption("assertive.severity",
"stop"))
x |
Input to check. |
classes |
As for |
severity |
How severe should the consequences of the assertion be?
Either |
The functions return nothing but throw an error if
x does not have any/all of the class classes.
assert_is_all_of(1:10, c("integer", "numeric"))
#These examples should fail.
assertive.base::dont_stop(assert_is_any_of(1:10, c("list", "data.frame")))