createMassPeaks-functions: Creates a MassPeaks object.

createMassPeaksR Documentation

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.

Author(s)

Sebastian Gibb mail@sebastiangibb.de

See Also

detectPeaks,MassSpectrum-method, MassPeaks

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

Examples

## 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

MALDIquant documentation built on Sept. 11, 2024, 6:15 p.m.