Learn R Programming

SeuratObject (version 5.0.2)

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

Description

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

Usage

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

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

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

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

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

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

See Also

Assay

Examples

Run this code
rna <- pbmc_small[["RNA"]]

colMeans(rna)

colSums(rna)

rowMeans(rna)

rowSums(rna)

Run the code above in your browser using DataLab