powered by
Centers a matrix.
centerx(x)
The centered matrix.
a matrix
John Kloke, Joseph McKean
Returns a centered matrix, i.e., each column of the matrix is replaced by deviations from its column mean.
scale
x <- cbind(seq(1,5,length=5),seq(10,20,length=5)) xc <- centerx(x) apply(xc,1,mean)
Run the code above in your browser using DataLab