spc-spline: Spectral smoothing by splines

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Smoothing splines

Usage

1
spc.smooth.spline(spc, newx = wl(spc), ...)

Arguments

spc

hyperSpec object

newx

wavelengh axis to interpolate on

...

further parameters handed to smooth.spline

Details

Spectral smoothing by splines

Value

hyperSpec object containing smoothed spectra

Note

This function is still experimental

Author(s)

Claudia Beleites

See Also

spc.loess

smooth.spline

Examples

1
2
3
4
5
6
7
8
p <- paracetamol [,,2200 ~ max]
plot (p, col = "gray")
smooth <- spc.smooth.spline (p [,, c (2200 ~ 2400, 2500 ~ 2825, 3150 ~ max)],
                             wl (paracetamol [,, 2200 ~ max]),
                             df = 4, spar = 1)
plot (smooth, col = "red", add = TRUE)

plot (p - smooth)

Example output

Loading required package: lattice
Loading required package: grid
Loading required package: ggplot2
Package hyperSpec, version 0.98-20161118

To get started, try
   vignette ("introduction", package = "hyperSpec")
   package?hyperSpec 
   vignette (package = "hyperSpec")

If you use this package please cite it appropriately.
   citation("hyperSpec")
will give you the correct reference.

The project homepage is http://hyperspec.r-forge.r-project.org

hyperSpec documentation built on May 2, 2019, 5:45 p.m.