Learn R Programming

MALDIquant (version 1.22.3)

createMassSpectrum: Creates a MassSpectrum object.

Description

This function creates a MassSpectrum object.

Usage

createMassSpectrum(mass, intensity, metaData=list())

Value

Returns a MassSpectrum object.

Arguments

mass

vector, mass or mass-to-charge ratio

intensity

vector, intensities for measured mass-to-charge ratios

metaData

list, some metadata to describe the spectrum

Author

Sebastian Gibb mail@sebastiangibb.de

See Also

Examples

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

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

## show some details
s

Run the code above in your browser using DataLab