rowSums.RleDataFrame: rowSums function for Rle DataFrames

rowSums.RleDataFrameR Documentation

rowSums function for Rle DataFrames

Description

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

Usage

rowSums.RleDataFrame(x, na.rm = FALSE)

Arguments

x

A DataFrame containing only numerical Rle columns.

na.rm

logical. Should missing values (including NaN) be omitted from the calculations?

Details

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

Value

A Rle-encoded numerical vector of the same class as in the DataFrame.

Author(s)

Charles Plessy

See Also

Other Rle DataFrames: rowsum.RleDataFrame()

Examples

exampleCAGEexp |> CTSStagCountDF() |> CAGEr:::rowSums.RleDataFrame(na.rm = TRUE)

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