centerx: Center Matrix

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/centerx.r

Description

Centers a matrix.

Usage

1

Arguments

x

a matrix

Details

Returns a centered matrix, i.e., each column of the matrix is replaced by deviations from its column mean.

Value

The centered matrix.

Author(s)

John Kloke kloke@biostat.wisc.edu, Joseph McKean

See Also

scale

Examples

1
2
3
x <- cbind(seq(1,5,length=5),seq(10,20,length=5))
xc <- centerx(x)
apply(xc,1,mean)

npsm documentation built on May 29, 2017, 12:12 p.m.

Search within the npsm package
Search all R packages, documentation and source code