centres the columns of a matrix to mean zero.
cen(X,w=rep(1,nrow(X))/nrow(X))
a raw data matrix.
a vector of case weights.
returns a matrix
# NOT RUN { X<-matrix(runif(10),ncol=2) Y<-cen(X) print(Y) # }
Run the code above in your browser using DataCamp Workspace