Learn R Programming

IDSL.FSA (version 1.2)

spectra_integrator: Spectra Integrator

Description

This function integrates individual m/z peaks from multiple chromatogram scans (spectra) into summed m/z peaks using a mass accuracy or nominal masses.

Usage

spectra_integrator(stackedSpectra, massError = 0, allowedNominalMass = FALSE)

Value

A matrix of integrated spectra. First and second columns represent intensity-weighted average m/z and cumulated intensity, respectively.

Arguments

stackedSpectra

A matrix of two columns of the stacked spectra. First and second columns should represent m/z and intensity, respectively.

massError

Mass accuracy in Da

allowedNominalMass

c(TRUE, FALSE). Select `TRUE` only for nominal mass analysis.

Examples

Run this code
data(stackedSpectra)
massError <- 0.005 # Da
Integrated_spectra <- spectra_integrator(stackedSpectra[, 1:2], massError)

Run the code above in your browser using DataLab