standardNormalVariate {prospectr} | R Documentation

## Standard normal variate transformation

### Description

`standardNormalVariate` normalizes each row of an input `data.frame` or `matrix` by substracting each row by its mean and dividing by its standard deviation

### Usage

    standardNormalVariate(X)

### Arguments

`X` | numeric `data.frame` or `matrix` to transform

### Details

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

### Value

a `matrix` of the transformed data

### Author(s)

Antoine Stevens

### References

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.

### See Also

`detrend`, `blockScale`, `blockNorm`, `msc`

### Examples

    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)

[Package prospectr version 0.1.3 Index]