Learn R Programming

SeuratObject (version 5.0.2)

$.Assay: Layer Data

Description

Get and set layer data

Usage

# S3 method for Assay
$(x, i)

# S3 method for Assay $(x, i) <- value

Value

$: Layer data for layer i

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

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

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

Run this code
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]

Run the code above in your browser using DataLab