dimnames.Seurat: Feature and Cell Names

View source: R/seurat.R

dimnames.SeuratR Documentation

Feature and Cell Names

Description

Get and set feature and cell inames in Seurat objects

Usage

## S3 method for class 'Seurat'
dimnames(x)

## S3 replacement method for class 'Seurat'
dimnames(x) <- value

Arguments

x

A Seurat object

value

A two-length list with updated feature and/or cells names

Value

dimnames: A two-length list with the following values:

  • A character vector with all features in the default assay

  • A character vector with all cells in x

dimnames<-: x with the feature and/or cell names updated to value

See Also

Seurat object, validity, and interaction methods $.Seurat(), Seurat-class, Seurat-validity, [[.Seurat(), [[<-,Seurat,NULL, [[<-,Seurat, dim.Seurat(), merge.Seurat(), names.Seurat(), subset.Seurat()

Cells(), dimnames.Assay5(), dimnames.Assay()

Examples

# Get the feature names of an object
head(rownames(pbmc_small))

# Get the cell names of an object
head(colnames(pbmc_small))

colnames(pbmc_small)[1] <- "newcell"
head(colnames(pbmc_small))


SeuratObject documentation built on Nov. 18, 2023, 1:06 a.m.