some_type: Is an object one of the specified types?

View source: R/FUNCTIONS.R

some_typeR Documentation

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
)

Arguments

object

Any R object.

types

A character vector of classes to test against.

Value

A logical indicator

Author(s)

Alex Zajichek

Examples

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


zajichek/cheese documentation built on July 26, 2023, 4:24 p.m.