Convenience function to aggregate the data frame according to the partitioning.
Can specify a aggregation function like in aggregate
.
get_by_partition( df, partitioning, FUN, columns = NULL, simplify = TRUE, drop = TRUE, BPPARAM = BiocParallel::SerialParam() )
df | Data frame that shall be aggregated. |
---|---|
partitioning | Nested list, specifying which |
FUN | Aggregation function. Can be a base function like |
columns | Optional: Only aggregate the specified columns of |
simplify | a logical indicating whether results should be simplified to a vector or matrix if possible. |
drop | a logical indicating whether to drop unused combinations
of grouping values. The non-default case |
BPPARAM | If multicore processing should be used, specify a |
Data frame with Group column that specifies the partition and one column per specified column with aggregated values.