Learn R Programming

mdatools (version 0.14.1)

prep.autoscale: Autoscale values

Description

Autoscale (mean center and standardize) values in columns of data matrix.

The use of `max.cov` allows to avoid overestimation of inert variables, which vary very little. Note, that the `max.cov` value is already in percent, e.g. if `max.cov = 0.1` it will compare the coefficient of variation of every variable with 0.1 want to use this option simply keep `max.cov = 0`.

Usage

prep.autoscale(data, center = TRUE, scale = FALSE, max.cov = 0)

Value

data matrix with processed values

Arguments

data

a matrix with data values

center

a logical value or vector with numbers for centering

scale

a logical value or vector with numbers for weighting

max.cov

columns that have coefficient of variation (in percent) below or equal to `max.cov` will not be scaled