ToolsForCoDa (version 1.0.2)

cen: centring of a data matrix

Description

centres the columns of a matrix to mean zero.

Usage

cen(X,w=rep(1,nrow(X))/nrow(X))

Arguments

X

a raw data matrix.

w

a vector of case weights.

Value

returns a matrix

Examples

Run this code
# NOT RUN {
X<-matrix(runif(10),ncol=2)
Y<-cen(X)
print(Y)
# }

Run the code above in your browser using DataCamp Workspace