colMeans-Assay-method: Row and Column Sums and Means

colMeans,Assay-methodR Documentation

Row and Column Sums and Means

Description

Calculate rowSums, colSums, rowMeans, and colMeans on Assay objects

Usage

## S4 method for signature 'Assay'
colMeans(x, na.rm = FALSE, dims = 1, ..., slot = "data")

## S4 method for signature 'Assay'
colSums(x, na.rm = FALSE, dims = 1, ..., slot = "data")

## S4 method for signature 'Assay'
rowMeans(x, na.rm = FALSE, dims = 1, ..., slot = "data")

## S4 method for signature 'Assay'
rowSums(x, na.rm = FALSE, dims = 1, ..., slot = "data")

Arguments

x

An Assay object

na.rm

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

dims

completely ignored by the Matrix methods.

...

Ignored

slot

Name of assay expression matrix to calculate column/row means/sums on

Value

colMeans: The column (cell-wise) means of slot

colSums: The column (cell-wise) sums of slot

rowMeans: The row (feature-wise) means of slot

rowSums: The row (feature-wise) sums of slot

See Also

Assay

Examples

rna <- pbmc_small[["RNA"]]

colMeans(rna)

colSums(rna)

rowMeans(rna)

rowSums(rna)


SeuratObject documentation built on Nov. 18, 2023, 1:06 a.m.