Learn R Programming

MALDIrppa (version 1.0.2)

redResolution: Reduce resolution of MassSpectrum objects

Description

This function allows to obtain a lighter version of a list of '>MassSpectrum objects by decreasing their m/z resolution.

Usage

redResolution(x, by = 1)

Arguments

x

A list of '>MassSpectrum objects.

by

Number of times reduction (by = 1, default).

Value

A list of '>MassSpectrum objects.

Details

This function reduces the resolution of mass spectra by eliminating a regular sequence of m/z sampling points in steps given by the argument by. For example, specifiying by = 2 means to reduce the length and memory usage of the signal by a half approximately.

Examples

Run this code
# NOT RUN {
# Load example data

data(spectra) # list of MassSpectra class objects

# Reduce resolution by a half

spectra.LowRes <- redResolution(spectra, by = 2)

# }

Run the code above in your browser using DataLab