Learn R Programming

MALDIquant (version 0.2)

.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,SingleSpectrum-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.

Details

See gcmlcm for details.

See Also

SingleSpectrum, estimateBaseline,SingleSpectrum-method, removeBaseline,SingleSpectrum-method, gcmlcm

Examples

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

## load readBrukerFlexData library for fid file import 
## (is also done automatically by importSingleSpectrum)
library("readBrukerFlexData");

## get examples directory
exampleDirectory <- system.file("Examples", package="readBrukerFlexData");

## read example spectrum
s <- importSingleSpectrum(file.path(exampleDirectory,
    "2010_05_19_Gibb_C8_A1/0_A1/1/1SLin/fid"));

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