Learn R Programming

baseline (version 1.3-5)

baseline.fillPeaks: Fill peaks

Description

An iterative algorithm using suppression of baseline by means in local windows

Usage

baseline.fillPeaks(spectra, lambda, hwi, it, int)

Value

baseline

Matrix of baselines corresponding to spectra spectra

corrected

Matrix of baseline corrected spectra

Arguments

spectra

Matrix with spectra in rows

lambda

2nd derivative penalty for primary smoothing

hwi

Half width of local windows

it

Number of iterations in suppression loop

int

Number of buckets to divide spectra into

Author

Kristian Hovde Liland and Bjørn-Helge Mevik

Details

In local windows of buckets the minimum of the mean and the previous iteration is chosen as the new baseline

References

Kristian Hovde Liland, 4S Peak Filling - baseline estimation by iterative mean suppression, MethodsX 2015

Examples

Run this code
data(milk)
bc.fillPeaks <- baseline(milk$spectra[1,, drop=FALSE], lambda=6,
	hwi=50, it=10, int=2000, method='fillPeaks')
if (FALSE) {
	plot(bc.fillPeaks)
}

Run the code above in your browser using DataLab