is_r6_instance | R Documentation |
Checks if the passed entity is an instance of a given R6 class name.
is_r6_instance(value, class_name, allow_null = FALSE)
value |
the value to check |
class_name |
The name of the class |
allow_null |
If TRUE, allow the value to be NULL. If FALSE (default) do not accept NULL. |
## Not run:
# For assertion
assertthat::assert_that(qscheck::is_r6_instance(value, "MyClass"))
# For check
if (qscheck::is_r6_instance(value, "MyClass")) {}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.