Apply metrics to groups.
IndexByGroups.RdTransforme a list of metrics to apply them to groups, typically to populations.
Examples
IndexByGroups(c("mean(x)", "sd(x)"), "pop")
#> [1] "tapply(x, pop, function(x) mean(x))" "tapply(x, pop, function(x) sd(x))"