Description Usage Arguments Value Examples
Tests if a variable of a certain class and returns an error message if not
1 | check_var_class(var, class_method, class_name, error_message = NULL)
|
var |
Object: an object for class test |
class_method |
Function vector: class test function, e.g.,
|
class_name |
Character: name of the class |
error_message |
Character: user-defined error message |
Error message if test fails
1 2 | obj <- 1:10
check_var_class(obj, is.numeric, 'numeric')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.