Learn R Programming

hyperSpec (version 0.98-20140523)

spc.rubberband: Rubberband baseline correction

Description

Rubberband baseline

Usage

spc.rubberband(spc, ..., upper = FALSE, noise = 0,
    spline = TRUE)

Arguments

spc
hyperSpec object
...
further parameters handed to smooth.spline
upper
logical indicating whether the lower or upper part of the hull should be used
noise
noise level to be taken into account
spline
logical indicating whether the baseline should be an interpolating spline through the support points or piecewise linear.

Value

  • hyperSpec object containing the baselines

Details

Baseline with support points determined from a convex hull of the spectrum.

See Also

spc.fit.poly, spc.fit.poly.below

vignette ("baseline")

Examples

Run this code
plot (paracetamol [,, 175 ~ 1800])
bl <- spc.rubberband (paracetamol [,, 175 ~ 1800], noise = 300, df = 20)
plot (bl, add = TRUE, col = 2)
plot (paracetamol [,, 175 ~ 1800] - bl)

Run the code above in your browser using DataLab