changePeakWidth {tofsims} | R Documentation

## method changePeakWidth

### Description

method changePeakWidth

### Usage

    changePeakWidth(object, selectMz, lowerWidth, upperWidth, ...)

    ## S4 method for signature 'PeakList,missing,missing,missing'
    changePeakWidth(object, selectMz,
      lowerWidth, upperWidth, ...)

    ## S4 method for signature 'PeakList,numeric,numeric,numeric'
    changePeakWidth(object, selectMz,
      lowerWidth, upperWidth, ...)

### Arguments

`object` | PeakList object
`selectMz` | numeric change width of peak closest to selectMz
`lowerWidth` | numeric lower width value in mass units
`upperWidth` | numeric upper width value in mass units
`...` | additional args

### Details

method changePeakWidth is used to modify the peak width of an individual peak it should be called with the argument mzRange to zoom into the region of interest for choosing the peak. Then two further clicks for choosing the (new) lower and upper peak widths.

### Value

PeakList object with upated peak widths

### Examples

    library(tofsimsData)
    data(tofsimsData)
    testPeakList<-PeakList(analysisName = analysisName(testSpectra),
    instrument = instrument(testSpectra),
    nz = nz(testSpectra),
    calibration = calibration(testSpectra),
    calibPoints = calibPoints(testSpectra),
    mz = mz(testSpectra),
    peakIDs = NULL,
    peakMzs = NULL)
    par(mfcol=c(1,2))
    testPeakList<-addPeaks(testPeakList, mzs=26:31, width=0.4)
    peakWidths(testPeakList)
    testPeakList<-changePeakWidth(testPeakList, selectMz = 27, lowerWidth = 0.2, upperWidth = 0.3)
    peakWidths(testPeakList)

[Package tofsims version 1.16.0 Index]