[.Assay | R Documentation |
Get and set layer data
## 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
x |
An |
i |
Name of layer data to get or set |
j |
Ignored |
... |
Arguments passed to |
value |
A matrix-like object to add as a new layer |
[
: The layer data for layer i
[<-
: x
with layer data value
saved as i
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()
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]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.