Learn R Programming

MALDIquant (version 1.22.3)

createMassPeaks: Creates a MassPeaks object.

Description

This function creates a MassPeaks object. Normally it shouldn't called by the user. Try detectPeaks,MassSpectrum-method instead.

Usage

createMassPeaks(mass, intensity, snr=rep.int(NA_real_, length(intensity)),
                metaData=list())

Value

Returns a MassPeaks object.

Arguments

mass

vector, mass or mass-to-charge ratio.

intensity

vector, intensities for measured mass-to-charge ratios.

snr

vector, signal-to-noise ratios for intensity values.

metaData

list, some metadata to describe the peaks.

Author

Sebastian Gibb mail@sebastiangibb.de

See Also

detectPeaks,MassSpectrum-method, MassPeaks

Website: https://strimmerlab.github.io/software/maldiquant/

Examples

Run this code
## load package
library("MALDIquant")

## create a MassPeaks object by default constructor
s <- createMassPeaks(mass=1:100, intensity=rnorm(100)^2,
                     metaData=list(name="example peaks"))

## show some details
s

Run the code above in your browser using DataLab