Learn R Programming

plyr (version 1.5.2)

each: Aggregate multiple functions into a single function.

Description

Aggregate multiple functions into a single function.

Usage

each(...)

Arguments

...
functions to combine

Details

Combine multiple functions to a single function returning a named vector of outputs

Each function should produce a single number as output

Examples

Run this code
each(min, max)(1:10)
each("min", "max")(1:10)
each(c("min", "max"))(1:10)
each(c(min, max))(1:10)
each(length, mean, var)(rnorm(100))

Run the code above in your browser using DataLab