sub-.Assay: Layer Data

[.AssayR Documentation

Layer Data

Description

Get and set layer data

Usage

## S3 method for class 'Assay'
x[i = missing_arg(), j = missing_arg(), ...]

## S4 replacement method for signature 'Assay,character,ANY,ANY'
x[i, j, ...] <- value

Arguments

x

An Assay object

i

Name of layer data to get or set

j

Ignored

...

Arguments passed to LayerData

value

A matrix-like object to add as a new layer

Value

[: The layer data for layer i

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

See Also

LayerData

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

Examples

rna <- pbmc_small[["RNA"]]

# Get a vector of layer names in this assay
rna[]

# Fetch layer data
rna["data"][1:10, 1:4]

# Set layer data
rna["data"] <- rna["counts"]
rna["data"][1:10, 1:4]


SeuratObject documentation built on May 29, 2024, 12:31 p.m.