Learn R Programming

SeuratObject (version 5.0.2)

subset.Assay: Subset an Assay

Description

Subset an Assay

Usage

# S3 method for Assay
subset(x, cells = NULL, features = NULL, ...)

Value

x with just the cells and features specified by cells and features

Arguments

x

An Assay object

cells

Cell names

features

Feature names

...

Ignored

See Also

v3 Assay object, validity, and interaction methods: $.Assay(), Assay-class, Assay-validity, CreateAssayObject(), [.Assay(), [[.Assay(), dim.Assay(), dimnames.Assay(), merge.Assay(), split.Assay()

Examples

Run this code
rna <- pbmc_small[["RNA"]]
rna2 <- subset(rna, features = VariableFeatures(rna))
rna2

Run the code above in your browser using DataLab