Learn R Programming

MALDIquant (version 1.5)

estimateBaseline-methods: Estimates the baseline of a MassSpectrum object.

Description

This method estimates the baseline of mass spectrometry data (represented by a MassSpectrum object).

Usage

## S3 method for class 'MassSpectrum':
estimateBaseline(object, 
    method=c("SNIP", "ConvexHull", "Median"),
    ...)

Arguments

object
MassSpectrum object
method
a baseline estimation function; see .estimateBaselineSnip, .estimateBaselineConvexHull,
...
arguments to be passed to method

Value

  • Returns a two column matrix (first column: mass, second column: intensity) of the estimated baseline.

See Also

MassSpectrum, .estimateBaselineSnip, .estimateBaselineConvexHull, .estimateBaselineMedian, removeBaseline,MassSpectrum-method

Examples

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

## load example data
data("fiedler2009subset", package="MALDIquant");

## choose only the first mass spectrum
s <- fiedler2009subset[[1]];

## plot spectrum
plot(s);

## estimate baseline
b <- estimateBaseline(s);

## draw baseline on the plot
lines(b, col="red");

Run the code above in your browser using DataLab