byMean
works like a very fast version of tapply with (weighted) FUN=mean
or FUN=weighted.mean
.
byMean(x, by, na.rm = FALSE, weight = NULL, ...)
numeric
vector to be averaged
(list of) factor(s)
for which the mean will be calculated
logical
If TRUE
NA
values will be removed
numeric
with of same length as x
not used
array
with dimensions of by