Description Usage Arguments Details Value Author(s) See Also Examples
Both functions fit polynomials to be used as baselines. If apply.to
is NULL
, a hyperSpec
object with the polynomial coefficients
is returned, otherwise the polynomials are evaluated on the spectral range
of apply.to
.
spc.fit.poly.below
tries to fit the baseline on appropriate spectral
ranges of the spectra in fit.to
. For details, see the
vignette ("baseline")
.
1 2 3 4 | spc.fit.poly(fit.to, apply.to = NULL, poly.order = 1)
spc.fit.poly.below(fit.to, apply.to = fit.to, poly.order = 1,
npts.min = NULL, noise = 0)
|
fit.to |
|
apply.to |
|
poly.order |
order of the polynomial to be used |
npts.min |
minmal number of points used for fitting the polynomial |
noise |
noise level to be considered during the fit. It may be given as one value for all the spectra, or for each spectrum separately. |
spc.fit.poly
calculates the least squares fit of order
poly.order
to the complete spectra given in fit.to
.
Thus fit.to
needs to be cut appropriately.
hyperspec
object containing the baselines in the spectra
matrix, either as polynomial coefficients or as polynomials evaluted on
the spectral range of apply.to
C. Beleites
vignette ("baseline", package = "hyperSpec")
1 2 3 4 5 6 7 | ## Not run: vignette ("baseline", package = "hyperSpec")
spc <- chondro [1 : 10]
baselines <- spc.fit.poly(spc [,, c (625 ~ 640, 1785 ~ 1800)], spc)
plot(spc - baselines)
baselines <- spc.fit.poly.below (spc)
plot (spc - baselines)
|
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
Fitting with npts.min = 15
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.