assert_class_any | R Documentation |
Asserts that an object is member of any of the specified classes.
assert_class_any(x, classes, name = "x")
x |
R object to test. |
classes |
Class names to check for inheritance. A character vector. |
name |
Name of the checked object to print in error message in case the assertion fails. A character scalar. |
In contrast to checkmate::assert_class()
, this function returns TRUE
as long as x
is at least member of one of classes
.
x
, invisibly.
Other functions extending the checkmate package:
assert_cli()
,
assert_df_or_tibble()
,
assert_inf_count()
xml2::read_html("https://pal.rpkg.dev/dev/license") |>
assert_class_any(classes = c("xml_document", "xml_nodeset", "xml_node"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.