Skip to contents

This function performs Standard Normal Variate (SNV) scaling on the input spectral data. SNV scaling scales each row of the input data to have zero mean and unit standard deviation. This is equivalent to autoscaling the transpose of the input data.

Usage

snv(x, drop.na = TRUE)

Arguments

x

A numeric matrix or data frame.

drop.na

A logical value indicating whether to remove missing values (NA) from the calculations. If TRUE (the default), missing values will be removed. If FALSE, missing values will be included.

Value

A list with the following components:

correction

The SNV-scaled data.

means

A vector of row means.

stds

A vector of row standard deviations.

Author

Christian L. Goueguel