dimnames.Assay {SeuratObject} | R Documentation |
Assay-Level Feature and Cell Names
Description
Get and set feature and cell names in v5 Assays
Usage
## S3 method for class 'Assay'
dimnames(x)
## S3 replacement method for class 'Assay'
dimnames(x) <- value
Arguments
x |
An |
value |
A two-length list where the first entry is the existing feature
names for |
Value
dimnames
: A two-length list with the following values:
A character vector will all features in
x
A character vector will all cells in
x
dimnames<-
: x
with the cell names updated to those
in value[[2L]]
See Also
v3 Assay object, validity, and interaction methods:
$.Assay()
,
Assay-class
,
Assay-validity
,
CreateAssayObject()
,
[.Assay()
,
[[.Assay()
,
dim.Assay()
,
merge.Assay()
,
split.Assay()
,
subset.Assay()
Cells()
,
dimnames.Assay5()
,
dimnames.Seurat()
Examples
rna <- pbmc_small[["RNA"]]
# Feature and cell names can be acquired with `rownames` and `colnames`
head(rownames(rna))
head(colnames(rna))
# Cell names can be updated with `colnames<-`
colnames(rna)[1] <- "newcell"
head(colnames(rna))
[Package SeuratObject version 5.0.2 Index]