rowsum.RleDataFrame: rowsum function for Rle DataFrames

View source: R/RleDataFrame.R

rowsum.RleDataFrameR Documentation

rowsum function for Rle DataFrames

Description

Drop-in replacement for the rowsum function, which does not work natively on S4Vectors::DataFrame objects containing S4Vectors::Rle-encoded numerical values.

Usage

## S3 method for class 'RleDataFrame'
rowsum(x, group, reorder = TRUE, na.rm = FALSE, ...)

Arguments

x

A DataFrame containing only numerical Rle columns.

group

a vector or factor giving the grouping, with one element per row of x. Missing values will be treated as another group and a warning will be given.

reorder

If TRUE, then the result will be in order of sort(unique(group)), if FALSE, it will be in the order that groups were encountered.

na.rm

Logical (TRUE or FALSE). Should NA (including NaN) values be discarded?

...

Other arguments to be passed to or from methods.

Details

See the file benchmarks/rowsum_on_Rle_DF.md in the source Git repository of CAGEr for the alternatives that were considered.

Author(s)

Charles Plessy

See Also

Other Rle DataFrames: rowSums.RleDataFrame()

Examples

exampleCAGEexp |> CTSStagCountDF() |>
  CAGEr:::rowsum.RleDataFrame(decode(CTSScoordinatesGR(exampleCAGEexp)$cluster), reorder = FALSE)

charles-plessy/CAGEr documentation built on Oct. 27, 2024, 10:11 p.m.