View source: R/wavelength_selection.R
| plot_wavelength_selection | R Documentation |
Shows the variables selected by select_wavelengths(): the mean
spectrum, with the selected regions shaded, above the importance of each
variable (VIP or selectivity ratio, with the threshold when one was
used) or, for iPLS, the RMSECV of each interval alone, with the selected
intervals colored.
plot_wavelength_selection(
object,
title = NULL,
wavelength = NULL,
xlab = NULL,
base_size = 11,
linewidth = 0.3
)
object |
An object returned by |
title |
The plot title. |
wavelength |
Optional ( |
xlab |
The title of the wavelength axis. Default is
|
base_size |
The size of the text, in points. Default is 11. |
linewidth |
The width of the mean spectrum and importance lines. Default is 0.3. |
A ggplot object.
Christian L. Goueguel
select_wavelengths()
data(forageLIBS)
wl <- suppressWarnings(as.numeric(names(forageLIBS)))
spectra <- forageLIBS[which(wl > 380 & wl < 430)]
sel <- select_wavelengths(spectra, forageLIBS$Ca, method = "sr", num_terms = 50)
plot_wavelength_selection(sel)
# the Ca II H and K lines
plot_wavelength_selection(sel, wavelength = c(390, 400))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.