condSum works like a very fast version of tapply with FUN=sum.
condSum
FUN=sum
condSum(x, index, na.rm = FALSE, ...)
x
numeric vector to be summed
numeric
index
(list of) factor(s) for which the sum will be calculated
factor(s)
na.rm
logical If TRUE NA values will be removed
logical
TRUE
NA
...
not used
array with dimensions of index
array