NormalizeMatrix {TRMF}R Documentation

Matrix Scaling

Description

A function for normalizing (scaling and centering) a matrix.

Usage

NormalizeMatrix(X, method = c("standard", "robust", "range", "none"),
            type = c("global", "rowwise", "columnwise"), na.rm = TRUE)

Arguments

X

a numeric matrix(like object)

method

type of scaling to perform, standard centers with mean, and scales by sd(), robust centers with the median and scales by mad(,constant=1), range maps to [0-1] interval

type

how should normalization be applied. global scales and centers matrix by one value. columnwise and rowwise normalize each column or row separately.

na.rm

logical value, ignore NA values or not.

Details

Scaling and centering quantities are stored as attributes.

Value

The possibly centered and scaled matrix. Scaling and centering quantities are stored as attributes.

Author(s)

Chad Hammerquist

Examples

x = matrix(1:10, ncol = 2)
NormalizeMatrix(x)

[Package TRMF version 0.1.5 Index]