Learn R Programming

MALDIquant (version 1.18)

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())

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.

Value

Returns a '>MassPeaks object.

See Also

detectPeaks,MassSpectrum-method, '>MassPeaks

Website: http://strimmerlab.org/software/maldiquant/

Examples

Run this code
# NOT RUN {
## 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