Learn R Programming

cheese (version 0.1.2)

some_type: Is an object one of the specified types?

Description

Check if an object inherits one (or more) of a vector classes.

Usage

some_type(
    object,
    types
)

Value

A logical indicator

Arguments

object

Any R object.

types

A character vector of classes to test against.

Author

Alex Zajichek

Examples

Run this code
#Columns of a data frame
heart_disease %>%
    purrr::map_lgl(
        some_type,
        types = c("numeric", "logical")
    )

Run the code above in your browser using DataLab