standardize: Standardize A Matrix

Description Usage Arguments Value Examples

View source: R/standardize.R

Description

This function centers and scales the columns of a matrix. It essentially produces the same result as scale

Usage

1

Arguments

x

a matrix

Value

A list with components

x

the standardized matrix x

center

column means of x

scale

norms of the (centered) columns of x

Examples

1
2
3
4
x <- matrix(runif(40),8,5)
x.std <- standardize(x)
colMeans(x.std$x)
colSums(x.std$x^2)

kouroshz/creNet documentation built on Aug. 4, 2017, 4:13 a.m.