reduceSpectrumResolution {tofsims} | R Documentation

## generic method reduceSpectrumResolution

### Description

reduceSpectrumResolution

### Usage

    reduceSpectrumResolution(object, everyN = 2, mode = "remove")

    ## S4 method for signature 'MassSpectra'
    reduceSpectrumResolution(object, everyN = 2, mode = "remove")

### Arguments

`object` | object of class MassSpectra
`everyN` | numeric act on every nth spectra point
`mode` | character 'remove' or 'keep'

### Details

The method reduceSpectrumResolution for MassSpectra is used sometimes for performance reasons.

### Value

object of class MassSpectra with reduced spectral resolution

object of class MassSpectra

### Examples

    library(tofsimsData)
    data(tofsimsData)
    par(mfcol=c(1,2))
    plot(testSpectra,mzRange = c(40,50),type='l')
    testSpectra <- reduceSpectrumResolution(object = testSpectra, everyN = 2, mode = 'remove')
    plot(testSpectra, mzRange = c(40,50), type='l')

[Package tofsims version 1.18.0 Index]