Description Usage Arguments Value See Also Examples
View source: R/assert-is-type-base.R
Checks to see if x belongs to any of the classes in classes.
1 2 3 4 5 | 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
.
1 2 3 | 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")))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.