shipunov (version 1.13)

Aggregate1: Aggregates by one vector and uses it for row names

Description

Aggregates by one vector and uses it for row names

Usage

Aggregate1(df, by, ...)

Arguments

df

Data frame to aggregate

by

Atomic object to use for aggregating

...

Further arguments for 'aggregate()'

Value

Same as of 'aggregate()'

Details

'Aggregate1()' is an 'aggregate()' helper: aggregates only by one atomic variable and uses it for row names.

See Also

aggregate

Examples

Run this code
# NOT RUN {
trees3 <- sample(letters[1:3], nrow(trees), replace=TRUE)
Aggregate1(trees, trees3, median, na.rm=TRUE)
# }

Run the code above in your browser using DataCamp Workspace