changeSampleIDs: Change sample IDs

View source: R/utils.R

changeSampleIDsR Documentation

Change sample IDs

Description

Change sample IDs in all fields of the SFE object where sample IDs are present, not just the colData.

Usage

changeSampleIDs(sfe, replacement)

Arguments

sfe

A SpatialFeatureExperiment object.

replacement

A named character vector whose names are the existing sample IDs to be changed and whose values are the corresponding replacements.

Value

An SFE object.

Examples

library(SFEData)
sfe <- McKellarMuscleData(dataset = "small")
sfe <- changeSampleIDs(sfe, c(Vis5A = "sample01"))
sampleIDs(sfe)

pachterlab/SpatialFeatureExperiment documentation built on March 11, 2024, 11:11 p.m.