Learn R Programming

mclust (version 1.1-7)

censcale: Centering and Scaling of Data

Description

Transforms a data set by subtracting the column mean from each column and dividing each column by the square root of its variance when the latter is sufficiently large in magnitude.

Usage

censcale(x, tol = 0.0001)

Arguments

x
Matrix of observations.
tol
Threshold for column scaling. A column is divided by the square root of its variance (standard deviation) when that quantity exceeds tol, The default value is 0.0001.

Value

  • The centered and scaled matrix of observations.

Examples

Run this code
data(iris)
iris.sc <- censcale(iris[,1:4])

Run the code above in your browser using DataLab