[[.Seurat | R Documentation |
The [[
operator pulls either subobjects
(eg. v3 or v5 assays,
dimensional reduction information,
or nearest-neighbor graphs) or cell-level
meta data from a Seurat
object
## S3 method for class 'Seurat'
x[[i = missing_arg(), ..., drop = FALSE, na.rm = FALSE]]
## S3 method for class 'Seurat'
head(x, n = 10L, ...)
## S3 method for class 'Seurat'
tail(x, n = 10L, ...)
x |
A |
i |
Name of cell-level meta data |
... |
Ignored |
drop |
See |
na.rm |
Remove cells where meta data is all |
n |
Number of meta data rows to show |
Varies based on the value of i
:
If i
is missing, a data frame with cell-level meta data
If i
is a vector with cell-level meta data names, a data frame
(or vector of drop = TRUE
) with cell-level meta data requested
If i
is a one-length character with the
name of a subobject, the
subobject specified by i
head
: The first n
rows of cell-level metadata
tail
: The last n
rows of cell-level metadata
See here for adding meta data with [[<-
,
here for adding subobjects with [[<-
, and
here for removing subobjects and cell-level meta
data with [[<-
Seurat object, validity, and interaction methods
$.Seurat()
,
Seurat-class
,
Seurat-validity
,
[[<-,Seurat
,
[[<-,Seurat,NULL
,
dim.Seurat()
,
dimnames.Seurat()
,
merge.Seurat()
,
names.Seurat()
,
subset.Seurat()
# Get the cell-level metadata data frame
head(pbmc_small[[]])
# Pull specific metadata information
head(pbmc_small[[c("letter.idents", "groups")]])
head(pbmc_small[["groups", drop = TRUE]])
# Get a sub-object (eg. an `Assay` or `DimReduc`)
pbmc_small[["RNA"]]
pbmc_small[["pca"]]
# Get the first 10 rows of cell-level metadata
head(pbmc_small)
# Get the last 10 rows of cell-level metadata
tail(pbmc_small)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.