Assert that an object has a certain class.
assertClass(
x,
class,
length = NULL,
null = FALSE,
empty = TRUE,
all = FALSE,
extra = TRUE,
nm = deparse1(substitute(x), backtick = TRUE),
call = parent.frame(),
msg = NULL
)Variable to check.
Expected class or classes.
Required length. If NULL length is not checked.
Whether it can be NULL.
Whether it can be empty.
Whether it should have all the classes or only at least one of them.
Whether the object can have extra classes.
Name to use in error messages. Defaults to the expression supplied
to x.
Call argument that will be passed to cli.
Custom error message.