R: Extension of 'rowsum'

groupsum {arrayhelpers} | R Documentation

## Extension of `rowsum`

### Description

`groupsum` extends `rowsum`: it allows `group` to be an array of the same shape as `x`.

### Usage

    groupsum(x, group = NULL, dim = 1L, reorder = TRUE, na.rm = FALSE, ...,
      drop = !is.array(x))

### Arguments

`x` | array to be `rowsum`med
`group` | grouping variable (integer or factor) indicating groups of samples.
`dim` | along which dimension should the group sums be taken? (default: rows)
`reorder` | should the groups be ordered? see `rowsum`
`na.rm` | shoud `NA`s be removed?
`...` | ignored
`drop` | should 1d arrays drop to vectors?

### Value

like `rowsum`, but further dimensions of the array are preserved.

### Author(s)

Claudia Beleites

### See Also

`rowsum` `rowsum`

[Package arrayhelpers version 1.0-20160527 Index]