has_class {assertions} | R Documentation |
Check object is some class
Description
This function checks whether object is a specific class
Usage
has_class(x, class)
Arguments
x |
A value to check. |
class |
checks if |
Value
A logical scalar indicating x
belongs to class
Examples
if(interactive()) {
has_class(1, "numeric") # TRUE
has_class(1, "character") # FALSE
}
[Package assertions version 0.1.0 Index]