prep.snv: Standard Normal Variate transformation

View source: R/prep.R

prep.snvR Documentation

Standard Normal Variate transformation

Description

Applies Standard Normal Variate (SNV) transformation to the rows of data matrix

Usage

prep.snv(data)

Arguments

data

a matrix with data values

Details

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')

Value

data matrix with processed values


mdatools documentation built on Sept. 11, 2024, 7:59 p.m.