addFixedWidth {tofsims} | R Documentation

## Generic method to add/update peak width

### Description

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

### Usage

    addFixedWidth(object, lowerWidth, upperWidth)

    ## S4 method for signature 'PeakList,numeric,numeric'
    addFixedWidth(object, lowerWidth,
      upperWidth)

### Arguments

`object` | PeakList object
`lowerWidth` | numeric
`upperWidth` | numeric

### Value

object PeakList with updated/new peak widths

### Examples

    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')

[Package tofsims version 1.8.0 Index]