Learn R Programming

SeuratObject (version 4.1.4)

FetchData: Access cellular data

Description

Retrieves data (feature expression, PCA scores, metrics, etc.) for a set of cells in a Seurat object

Usage

FetchData(object, ...)

# S3 method for DimReduc FetchData( object, vars, cells = NULL, slot = c("embeddings", "loadings", "projected"), ... )

# S3 method for Seurat FetchData(object, vars, cells = NULL, slot = "data", ...)

Value

A data frame with cells as rows and cellular data as columns

Arguments

object

An object

...

Arguments passed to other methods

vars

List of all variables to fetch, use keyword “ident” to pull identity classes

cells

Cells to collect data for (default is all cells)

slot

Slot to pull feature data for

Examples

Run this code
pc1 <- FetchData(object = pbmc_small, vars = 'PC_1')
head(x = pc1)
head(x = FetchData(object = pbmc_small, vars = c('groups', 'ident')))

Run the code above in your browser using DataLab