Does the input belong to or inherit all of these classes?

isAll(x, classes, .xname = getNameInParent(x))

Arguments

x

Object.

classes

character. Object classes.

.xname

Name of object defined in x. Not intended to be used directly.

Value

TRUE on success; FALSE on failure, with cause set.

Note

Updated 2019-10-04.

Examples

x <- 1L ## TRUE ==== isAll(x, classes = c("integer", "numeric"))
#> [1] TRUE
## FALSE ==== isAll(x, classes = c("integer", "NULL"))
#> [1] FALSE #> Cause: 'x' is not all of: integer, NULL.