prep.snv | R Documentation |
Applies Standard Normal Variate (SNV) transformation to the rows of data matrix
prep.snv(data)
data |
a matrix with data values |
SNV is a simple preprocessing to remove scatter effects (baseline offset and slope) from spectral data, e.g. NIR spectra.
@examples
### Apply SNV to spectra from simdata
library(mdatools) data(simdata)
spectra = simdata$spectra.c wavelength = simdata$wavelength
cspectra = prep.snv(spectra)
par(mfrow = c(2, 1)) mdaplot(cbind(wavelength, t(spectra)), type = 'l', main = 'Before SNV') mdaplot(cbind(wavelength, t(cspectra)), type = 'l', main = 'After SNV')
data matrix with processed values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.