Learn R Programming

tofsims (version 1.0.2)

addFixedWidth: Generic method to add/update peak width

Description

This method will update current upper/lower width for all peaks

Usage

addFixedWidth(object, lowerWidth, upperWidth)

## S3 method for class 'PeakList,numeric,numeric': addFixedWidth(object, lowerWidth, upperWidth)

Arguments

object
PeakList object
lowerWidth
numeric
upperWidth
numeric

Value

  • object PeakList with updated/new peak widths

Examples

Run this code
library(tofsimsData)
data(tofsimsData)
testSpectra<-reduceSpectrumResolution(object = testSpectra, everyN = 4, mode = 'keep')
testSpectra<-smootherSpline(testSpectra, stepsize = 10, spar = 0.3)
testSpectra<-smootherGolay(testSpectra, p = 3, n = 5)
testSpectra<-peakPick(testSpectra, span = 100)
testSpectra<-addFixedWidth(testSpectra, 0.2, 0.2)
plot(testSpectra, , mzRange=c(38.5,40.5), type = 'l')

Run the code above in your browser using DataLab