setSampleMetadata: set sampleMetadata in a ptrSet

View source: R/SetMethods.R

setSampleMetadataR Documentation

set sampleMetadata in a ptrSet

Description

Insert a samplemetada data.frame in a ptrSet object. The dataframe must have all file names in rownames.

Usage

setSampleMetadata(set, sampleMetadata)

Arguments

set

a ptrSet object

sampleMetadata

a data.frame with all file names of the ptrSet in row names

Value

the ptrSet object in argument with the sampleMetadata modified

Examples

dirRaw <- system.file("extdata/exhaledAir", package = "ptairData")
exhaledPtrset <- createPtrSet(dir=dirRaw, setName="exhaledPtrset", 
mzCalibRef = c(21.022, 60.0525), fracMaxTIC = 0.7, saveDir = NULL )
SMD<-getSampleMetadata(exhaledPtrset )
colnames(SMD)[1]<-'individual'
exhaledPtrset<-setSampleMetadata(exhaledPtrset ,SMD)

camilleroquencourt/ptairMS documentation built on June 9, 2024, 10:35 a.m.