rtmsPeak {rtms}R Documentation

Create an RTMS m/z Peak Object

Description

Generates an object of class rtmsPeak which contains the m/z values bounding a spectrometric peak to be measured. A peak object specifies not only the m/z value at the cetner of the peak, but the upper and lower bounds within which the peak is to be quantified; it also may optionally include wider upper and lower bounds used to plot the peak in a wider context of the spectrum.

Usage

rtmsPeak(
  value,
  peakWidth = 0.1,
  windowWidth = NULL,
  bounds = NULL,
  window = NULL
)

Arguments

value

The m/z value that the peak is intended to measure

peakWidth

The width of the peak centered on value. If a single numeric value, the lower bound of the peak will lie peakWidth/2 below value,and the upper bound will lie peakWidth/2 above value. If a vector of two numeric values, the first value specifies how far below value the lower bound lies, and the second value specifies how far above value the upper bound lies. If parameter bounds is not null, this parameter will be ignored.

windowWidth

The width of the optional wider window around value used to show the peak in context. Operates by the same principles as peakWidth with a single value split evenly between lower and upper bounds, and two values specifying how far below and above value each bound lies. If parameter window is not null, this parameter will be ignored.

bounds

If not null, a two-value numeric vector specifying the lower and upper m/z bounds of the measured peak. One of bounds or peakWidth must be not null, and if bounds is not null, then peakWidth will be ignored.

window

If not null, a two-value numeric vector specifying the lower and upper m/z bounds of the wider context window of the peak. If window is not null, then windowWidth will be ignored.

Value

An object of class rtmsPeak, used by RTMS functions to extract and measure peaks from mass spectra.

Examples

peaks <- rtmsPeak(1516.83,peakWidth=0.2,windowWidth = c(5,10))

[Package rtms version 0.2.0 Index]