cen: centring of a data matrix

cenR Documentation

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

Author(s)

Jan Graffelman (jan.graffelman@upc.edu)

Examples

X<-matrix(runif(10),ncol=2)
Y<-cen(X)
print(Y)

ToolsForCoDa documentation built on April 3, 2025, 7:47 p.m.