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).
Arguments
- x
data frame or tibble of the spectra.
- id
optional (
NULL
by default). Column name of a factor variable that identified each spectrum.- colvar
optional (
NULL
by default). Column name of a numeric variable to be display in color scale.- .interactive
optional (
FALSE
by default). When set toTRUE
enables interactive plot.- drop_na
Optional (
FALSE
by default). Remove rows with NA intensity if drop_na isTRUE
.