Skip to contents

Subtracts the mean and scales to unit variance.

Usage

rescale_snv(x, y, ...)

# S4 method for numeric,numeric
rescale_snv(x, y, ...)

# S4 method for ANY,missing
rescale_snv(x, y, ...)

Arguments

x, y

A numeric vector. If y is missing, an attempt is made to interpret x in a suitable way (see grDevices::xy.coords()).

...

Currently not used.

Value

Returns a list with two components x and y.

References

Barnes, R. J., Dhanoa, M. S. & Lister, S. J. (1989). Standard Normal Variate Transformation and De-Trending of Near-Infrared Diffuse Reflectance Spectra. Applied Spectroscopy, 43(5): 772-777. doi:10.1366/0003702894202201 .

See also

Other normalization methods: rescale_area(), rescale_range(), rescale_total(), rescale_transform()

Author

N. Frerebeau

Examples

## Raman spectrometry
data("Raman")

## Subset from 200 to 800 1/cm
Raman <- signal_select(Raman, from = 200, to = 800)

## Plot spectrum
plot(Raman, type = "l", xlab = "Raman shift", ylab = "Intensity")


## Normalize SNV
Raman_snv <- rescale_snv(Raman)
plot(Raman_snv, type = "l", xlab = "Raman shift", ylab = "Intensity")