reduceSpectrumResolution: generic method reduceSpectrumResolution

Description Usage Arguments Details Value Examples

Description

reduceSpectrumResolution

Usage

1
2
3
4
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

1
2
3
4
5
6
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')

tofsims documentation built on Nov. 8, 2020, 5:10 p.m.