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")
    )


cheese documentation built on Jan. 7, 2023, 1:17 a.m.