peakWidths {tofsims} | R Documentation

## Generic method peakWidths

### Description

Generic method peakWidths

peakWidths

### Usage

    peakWidths(object, plot = FALSE)

    ## S4 method for signature 'PeakList'
    peakWidths(object, plot = FALSE)

### Arguments

`object` | PeakList object
`plot` | boolean should there be graphical output

### Details

This method will calculate peak widths (m/z) based on lower and upper widths.

Method to return the peakWidth values of all peaks. On plot=TRUE the width values are ploted against the M/z of the corresponding peak.

### Value

vector of 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)
    testPeakList<-addPeaks(testPeakList, mzs=26:31, width=0.4)
    testPeakList<-findPeakWidth(testPeakList, p = 3, n = 199,
    span = 100, widthExtLower = 2, widthExtUpper = 2)
    testPeakList<-peakWidths(testPeakList, plot = FALSE)

[Package tofsims version 1.22.0 Index]