is_s4_instance | R Documentation |
Checks if the passed entity is an S4 instance of a specified class.
is_s4_instance(value, class_name, allow_null = FALSE)
value |
the value to check |
class_name |
the name of the class, as a string. |
allow_null |
if true, accept a value that is NULL. |
## Not run:
# For assertion
assertthat::assert_that(
qscheck::is_s4_instance(value, "MyClass")
)
# For check
if (qscheck::is_s4_instance(value, "MyClass")) {}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.