# NOT RUN {
require(tidyverse)
#1) Default
heart_disease %>%
map_lgl(
type_match,
types = "numeric"
)
#2) Use negation
heart_disease %>%
map_lgl(
type_match,
types = "numeric",
negated = TRUE
)
#3) Multiple types
heart_disease %>%
map_lgl(
type_match,
types = c("numeric", "factor")
)
#4) Check other objects
heart_disease %>%
glm(Sex ~ Age, data = ., family = "binomial") %>%
type_match(
types = "glm"
)
# }
Run the code above in your browser using DataLab