$.Assay {SeuratObject}R Documentation

Layer Data

Description

Get and set layer data

Usage

## S3 method for class 'Assay'
x$i

## S3 replacement method for class 'Assay'
x$i <- value

Arguments

x

An Assay object

i

Name of layer data to get or set

value

A matrix-like object to add as a new layer

Value

$: Layer data for layer i

$<-: x with layer data value saved as i

See Also

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

Examples

rna <- pbmc_small[["RNA"]]

# Fetch a layer with `$`
rna$data[1:10, 1:4]

# Add a layer with `$`
rna$data <- rna$counts
rna$data[1:10, 1:4]


[Package SeuratObject version 5.0.2 Index]