unitVarianceScaling: A function for scaling to unit variance.

View source: R/mrbin.R

unitVarianceScalingR Documentation

A function for scaling to unit variance.

Description

This function performs scaling of binned data to unit variance so that each bin has variance 1 and mean 0. This is rarely necessary, but might be advantageous, e.g. in artificial neural networks.

Usage

unitVarianceScaling(mrbinResults, verbose = TRUE, errorsAsWarnings = FALSE)

Arguments

mrbinResults

An mrbin object

verbose

Should a summary be printed?

errorsAsWarnings

If TRUE, errors will be turned into warnings. Should be used with care, as errors indicate undocumented changes to the data.

Value

An invisible mrbin object containing scaled NMR data.

Examples

mrbinResults<-mrbin(silent=TRUE,setDefault=TRUE,parameters=list(dimension="1D",
         binwidth1D=0.05,PQNScaling="No",PCA="No",tryParallel=TRUE,logTrafo="No",
         NMRfolders=c(system.file("extdata/1/10/pdata/10",package="mrbin"),
                      system.file("extdata/2/10/pdata/10",package="mrbin"),
                      system.file("extdata/3/10/pdata/10",package="mrbin"))))
mrbinResults<-unitVarianceScaling(mrbinResults)

mrbin documentation built on June 22, 2024, 9:39 a.m.