Description Usage Arguments Value See Also Examples
Checks to see if the input is an S4 object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | assert_is_S4(x, severity = getOption("assertive.severity", "stop"))
assert_is_s4(x, severity = getOption("assertive.severity", "stop"))
assert_is_ref_class_generator(x, severity = getOption("assertive.severity",
"stop"))
assert_is_ref_class_object(x, severity = getOption("assertive.severity",
"stop"))
is_s4(x, .xname = get_name_in_parent(x))
is_S4(x, .xname = get_name_in_parent(x))
is_ref_class_generator(x, .xname = get_name_in_parent(x))
is_ref_class_object(x, .xname = get_name_in_parent(x))
|
x |
Input to check. |
severity |
How severe should the consequences of the assertion be?
Either |
.xname |
Not intended to be used directly. |
is_S4
wraps isS4
, providing more information on
failure. assert_is_S4
returns nothing but throws an error if
is_S4
returns FALSE
.
isS4
.
1 2 3 | assert_is_s4(getClass("MethodDefinition"))
# These examples should fail.
assertive.base::dont_stop(assert_is_s4(1:10))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.