standardNormalVariate {prospectr} | R Documentation |
standardNormalVariate
normalizes each row of an
input data.frame
or matrix
by substracting
each row by its mean and dividing by its standard deviation
standardNormalVariate(X)
X |
numeric |
SNV is simple way for normalizing spectral data that intends to correct for light scatter. It operates row-wise:
SNV_i = \frac{x_i - \bar{x_i}}{s_i}
where x_i is the signal of a sample i, \bar{x_i} is its mean and s_i its standard deviation
a matrix
of the transformed data
Antoine Stevens
Barnes RJ, Dhanoa MS, Lister SJ. 1989. Standard normal variate transformation and de-trending of near-infrared diffuse reflectance spectra. Applied spectroscopy, 43(5): 772-777.
detrend
, blockScale
,
blockNorm
, msc
data(NIRsoil) spc <- 1/10^NIRsoil$spc # conversion to reflectance snv <- standardNormalVariate(X = spc) # 10 first snv spectra matplot(as.numeric(colnames(snv)),t(snv[1:10,]),type='l',xlab='wavelength /nm',ylab='snv') ## Not run: apply(snv,1,sd) # check ## End(Not run)