unitMassPeaks {tofsims} | R Documentation

## Generic method for unitMassPeaks

### Description

Generic method for unitMassPeaks

### Usage

    unitMassPeaks(
      object,
      mzRange,
      widthAt,
      factor,
      upper = NULL,
      lower = NULL,
      ...
    )

    ## S4 method for signature 'MassSpectra,numeric,numeric'
    unitMassPeaks(
      object,
      mzRange,
      widthAt,
      factor,
      upper = NULL,
      lower = NULL,
      ...
    )

### Arguments

`object` | object of class MassSpectra
`mzRange` | vector numeric with lower and upper mass range limit for which to set unit mass peaks
`widthAt` | vector numeric two mass values at which to sample for peak width
`factor` | vector numeric two values summing up to 1 for setting assymetric peak width limits
`upper` | vector numeric upper peak width limits
`lower` | vectpr numeric lower peak width limits
`...` | additional args

### Value

object of class PeakList with unit mass peaks

### Examples

    library(tofsimsData)
    data(tofsimsData)
    testSpectra <- calibPointNew(testSpectra, mz = 15, value = 15.01551)
    testSpectra <- calibPointNew(testSpectra, mz = 181, value = 181.0228)
    testSpectra <- recalibrate(testSpectra)
    testSpectra <- unitMassPeaks(testSpectra, mzRange = c(1,200), widthAt = c(15, 181),
    factor = c(0.4, 0.6), lower = c(14.97, 15.05), upper = c(180.84, 181.43))
    plot(testSpectra, mzRange = c(1,200), type = 'l')

[Package tofsims version 1.20.0 Index]