Set metadata for either SpatialExperiment or Seurat object
Source:R/seurat_compatibility.R
setMetadata.Rd
Set metadata for either SpatialExperiment or Seurat object
Examples
library(STexampleData)
spe <- Visium_humanDLPFC()
#> see ?STexampleData and browseVignettes('STexampleData') for documentation
#> loading from cache
metadata <- getMetadata(spe)
metadata$new_column <- 1
spe_updated <- setMetadata(spe, metadata)
"new_column" %in% colnames(getMetadata(spe_updated))
#> [1] TRUE