typly {cheese} | R Documentation |
Evaluate a function on columns conforming to one or more (or no) specified types
Description
Apply a function to columns in a data.frame
that inherit one of the specified types.
Usage
typly(
data,
f,
types,
negated = FALSE,
...
)
Arguments
data |
A |
f |
A |
types |
A |
negated |
Should the function be applied to columns that don't match any |
... |
Additional arguments to be passed to |
Value
A list
Author(s)
Alex Zajichek
Examples
heart_disease %>%
#Compute means on numeric or logical data
typly(
f = mean,
types = c("numeric", "logical"),
na.rm = TRUE
)
[Package cheese version 0.1.2 Index]