Skip to contents

Does the object belong to or inherit any of these classes?

Usage

isAny(x, classes)

Arguments

x

Object.

classes

character. Object classes.

Value

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

Note

Updated 2019-10-04.

Examples

x <- 1L

## TRUE ====
isAny(x, classes = c("integer", "NULL"))
#> [1] TRUE
isAny(x, classes = c("numeric", "NULL"))
#> [1] TRUE
isAny(x, classes = c("atomic", "NULL"))
#> [1] TRUE

## FALSE ====
isAny(x, classes = c("character", "data.frame"))
#> [1] FALSE