Learn R Programming

MALDIquant (version 1.4)

.estimateBaselineConvexHull: Estimates the baseline by a Convex Hull.

Description

This function estimates the baseline of mass spectrometry data. The baseline estimation is based on creating a Convex Hull below the spectrum. It is hidden by NAMESPACE because it is a private function and estimateBaseline,MassSpectrum-method should be used instead.

Usage

.estimateBaselineConvexHull(x, y)

Arguments

x
vector of x values
y
vector of y values

Value

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

See Also

MassSpectrum, estimateBaseline,MassSpectrum-method, 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, method="ConvexHull");

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

Run the code above in your browser using DataLab