plotSpec | R Documentation |
Spectrum plots are commonly x–y plots in which the x-axis represents the wavelength and the y-axis represents intensity of a spectrum's signal. The function allows to plot a spectrum or several spectra in a single plot, identified either by an id (for example, the samples or spectra id) or by a target variable (for example, the concentration of a chemical element).
plotSpec(x, id = NULL, colvar = NULL, .interactive = FALSE, drop_na = FALSE)
x |
data frame or tibble of the spectra. |
id |
optional ( |
colvar |
optional ( |
.interactive |
optional ( |
drop_na |
Optional ( |
This function is based on the ggplot2 package, thus allowing users to easily add or modify different components of the plot.
Object of class ggplot or of class plotly if .interactive = TRUE
.
Christian L. Goueguel
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.