Combine multiple functions into a single function returning a named vector of outputs. Note: you cannot supply additional parameters for the summary functions
each(...)
... | functions to combine. each function should produce a single number as output |
---|
summarise
for applying summary functions to data
# Call min() and max() on the vector 1:10 each(min, max)(1:10)#> min max #> 1 10# This syntax looks a little different. It is shorthand for the # the following: f<- each(min, max) f(1:10)#> min max #> 1 10# Three equivalent ways to call min() and max() on the vector 1:10 each("min", "max")(1:10)#> min max #> 1 10#> min max #> 1 10#> min max #> 1 10#> length mean var #> 100.0000000 0.1285784 1.0174484