Aggregate matrix over groups

aggregate_matrix(x, groups = NULL, fun = "mean")

Arguments

groups

A character vector with the groups to aggregate over.

fun

The summary function to be applied to each group.

Value

A summary matrix.