Learn R Programming

MALDIquant (version 1.7)

.estimateNoiseSuperSmoother: Estimates the noise by Friedman's Super Smoother.

Description

This function estimates the noise of mass spectrometry data using Friedman's Super Smoother. It is hidden by NAMESPACE because it is a private function and estimateNoise,MassSpectrum-method should be used instead.

Usage

.estimateNoiseSuperSmoother(x, y, ...)

Arguments

x
vector of x values
y
vector of y values
...
arguments to be passed to supsmu.

Value

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

See Also

MassSpectrum, estimateNoise,MassSpectrum-method, supsmu

Examples

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

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

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

## transform intensities
s <- transformIntensity(s, sqrt)

## remove baseline
s <- removeBaseline(s)

## plot spectrum
plot(s)

## estimate noise
n <- estimateNoise(s, method="SuperSmoother")

## draw noise on the plot
lines(n, col="red")

Run the code above in your browser using DataLab