rescale_snv {alkahest}R Documentation

Standard Normal Variate (SNV) Transformation

Description

Subtracts the mean and scales to unit variance.

Usage

rescale_snv(x, y, ...)

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

## S4 method for signature '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.

Author(s)

N. Frerebeau

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

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

[Package alkahest version 1.2.0 Index]