aggregate_rows {orthogene} | R Documentation

## Aggregate rows of matrix

### Description

Aggregate rows of a matrix using a grouping vector.

### Usage

    aggregate_rows(
      X,
      groupings,
      FUN = "sum",
      method = c("monocle3", "stats", "delayedarray"),
      as_sparse = TRUE,
      as_DelayedArray = TRUE,
      dropNA = TRUE,
      verbose = TRUE
    )

### Arguments

`X` | Input matrix.
`groupings` | Gene groups of the same length as `nrow(X)`.
`FUN` | Aggregation function (DEFAULT: `"sum"`).
`method` | Aggregation method.
`as_sparse` | Convert aggregated matrix to sparse matrix.
`as_DelayedArray` | Convert aggregated matrix to DelayedArray.
`dropNA` | Drop genes assigned to `NA` in `groupings`.
`verbose` | Print messages.

### Value

Aggregated matrix

[Package orthogene version 1.0.2 Index]