Learn R Programming

MALDIquant (version 1.0)

removeBaseline-methods: Removes the baseline of a MassSpectrum object.

Description

This method removes the baseline of mass spectrometry data (represented by a MassSpectrum object). The intensity of the mass spectrometry data would be reduced by baseline.

Usage

## S3 method for class 'MassSpectrum':
removeBaseline(object,
    baseline,
    \dots)

Arguments

object
MassSpectrum object
baseline
a two column matrix with intensities (y-values) as second column. If no baseline argument is given the baseline would be estimate automatically by calling
...
arguments to be passed to estimateBaseline,MassSpectrum-method

Value

  • Returns a modified MassSpectrum object with reduced intensities.

References

See website: http://strimmerlab.org/software/maldiquant/

See Also

MassSpectrum, estimateBaseline,MassSpectrum-method

Examples

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

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

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

## plot spectrum
plot(s);

## subtract baseline 
b <- removeBaseline(s);

## draw modified spectrum on the plot
lines(b, col="blue");

Run the code above in your browser using DataLab