Learn R Programming

MALDIquant (version 1.18)

createMassSpectrum: Creates a MassSpectrum object.

Description

This function creates a '>MassSpectrum object.

Usage

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

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

Value

Returns a '>MassSpectrum object.

See Also

'>MassSpectrum

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

Examples

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