Learn R Programming

alkahest (version 1.3.0)

rescale_snv: Standard Normal Variate (SNV) Transformation

Description

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, ...)

Value

Returns a list with two components x and 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.

Author

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. tools:::Rd_expr_doi("10.1366/0003702894202201").

See Also

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

Examples

Run this code
## 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")

Run the code above in your browser using DataLab