powered by
If a function named is.class exists, call is.class(x). If not, call is(x, class).
is.class
is.class(x)
is(x, class)
is2(x, class, .xname = get_name_in_parent(x))
Input to check.
Target class that x maybe belong to.
x
Not intended to be used directly.
TRUE if x belongs to the class and FALSE otherwise.
TRUE
FALSE
is, and assert_is_all_of for the corresponding assert fns.
is
assert_is_all_of
# NOT RUN { is2(1:5, "character") is2(matrix(1:5), "character") is2(1:5, c("character", "list", "numeric")) is2(mean, c("function", "data.frame")) # }
Run the code above in your browser using DataLab