Description Usage Arguments Value See Also Examples
Checks to see if an object is inherited from any of the specified classes.
1 2 3 4 | assert_is_inherited_from(x, classes,
severity = getOption("assertive.severity", "stop"))
is_inherited_from(x, classes, .xname = get_name_in_parent(x))
|
x |
Any R variable. |
classes |
A character vector of classes. |
severity |
How severe should the consequences of the assertion be?
Either |
.xname |
Not intended to be used directly. |
TRUE
if x
inherits from at least one of the classes,
as determined by inherits
.
1 2 3 | x <- structure(1:5, class = c("foo", "bar"))
assert_is_inherited_from(x, c("foo", "baz"))
assertive.base::dont_stop(assert_is_inherited_from(x, c("Foo", "baz")))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.