setSampleMetadata {ptairMS} | R 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)

[Package ptairMS version 1.0.1 Index]