$.Seurat | R Documentation |
Get and set cell-level meta data
## S3 method for class 'Seurat'
x$i
## S3 replacement method for class 'Seurat'
x$i, ... <- value
## S4 replacement method for signature 'Seurat,character,missing,data.frame'
x[[i, j, ...]] <- value
## S4 replacement method for signature 'Seurat,missing,missing,data.frame'
x[[i, j, ...]] <- value
## S4 replacement method for signature 'Seurat,character,missing,factor'
x[[i, j, ...]] <- value
## S4 replacement method for signature 'Seurat,character,missing,list'
x[[i, j, ...]] <- value
## S4 replacement method for signature 'Seurat,missing,missing,list'
x[[i, j, ...]] <- value
## S4 replacement method for signature 'Seurat,character,missing,vector'
x[[i, j, ...]] <- value
x |
A |
i |
Name of cell-level meta data |
... |
Ignored |
value |
A vector to add as cell-level meta data |
j |
Ignored |
$: Metadata column i
for object x
;
note: unlike [[
, $
drops the shape of the metadata
to return a vector instead of a data frame
$<-
: x
with metadata value
saved as i
Seurat object, validity, and interaction methods
Seurat-class
,
Seurat-validity
,
[[.Seurat()
,
[[<-,Seurat
,
[[<-,Seurat,NULL
,
dim.Seurat()
,
dimnames.Seurat()
,
merge.Seurat()
,
names.Seurat()
,
subset.Seurat()
# Get metadata using `$'
head(pbmc_small$groups)
# Add metadata using the `$' operator
set.seed(42)
pbmc_small$value <- sample(1:3, size = ncol(pbmc_small), replace = TRUE)
head(pbmc_small[["value"]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.