scaling_UV: Unit-Variance scaling of each column

View source: R/utils.R

scaling_UVR Documentation

Unit-Variance scaling of each column

Description

Unit-Variance (UV) scale each variable (column). UV-scaling applied as (value - mean) / stdev. Unit-Variance Scaling or Autoscaling, is commonly applied and uses the standard deviation as the scaling factor. After autoscaling, all metabolites have a standard deviation of one and therefore the data is analyzed on the basis of correlations instead of covariances.

Usage

scaling_UV(inputMat)

Arguments

inputMat

(Observation x Variable) data.frame of measurements, with observations as rows and different variables as columns.

Value

Matrix of measurements UV-scaled columnwise.

Examples

## Not run: 
inputMat <- data.frame(matrix(c(1,4,7, 8,4,0, 3,6,9), nrow=3))
scaling_UV(inputMat)
#       X1 X2 X3
# [1,] -1  1 -1
# [2,]  0  0  0
# [3,]  1 -1  1

## End(Not run)

santaR documentation built on May 24, 2022, 1:06 a.m.