A function to check if an input object has a specific class name.

has_class(.data, .class)

Arguments

.data

Any R object.

.class

Character vector. Specifies a class name to check against.

Value

Logical value.

Developer Examples

tmp <- "abc" immunarch:::has_class(tmp, "new_class") tmp <- immunarch:::add_class(tmp, "new_class") immunarch:::has_class(tmp, "new_class")