changeSampleIDs: Change sample IDs

View source: R/changeSampleIDs.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 Nov. 15, 2024, 1:46 a.m.