data(NIRsoil)
NIRsoil$spc_snv <- standardNormalVariate(X = NIRsoil$spc)
# 10 first snv spectra
matplot(
x = as.numeric(colnames(NIRsoil$spc_snv)),
y = t(NIRsoil$spc_snv[1:10, ]),
type = "l",
xlab = "wavelength, nm",
ylab = "snv"
)
if (FALSE) {
apply(NIRsoil$spc_snv, 1, sd) # check
}
Run the code above in your browser using DataLab