assert_is_inherited_from(x, classes, severity = getOption("assertive.severity", "stop")) is_inherited_from(x, classes, .xname = get_name_in_parent(x))
"stop"
"warning"
"message"
"none"
TRUE
x
inherits
is
is2
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")))
Run the code above in your browser using DataCamp Workspace