R: Fast conditional sum

condSum {ffbase} | R Documentation

## Fast conditional sum

### Description

`condSum` works like a very fast version of tapply with `FUN=sum`.

### Usage

    condSum(x, index, na.rm = FALSE, ...)

### Arguments

`x` | `numeric` vector to be summed
`index` | (list of) `factor(s)` for which the sum will be calculated
`na.rm` | `logical` If `TRUE` `NA` values will be removed
`...` | not used

### Value

`array` with dimensions of `index`

[Package ffbase version 0.13.1 Index]