bicenter {ProcMod}R Documentation

Double centering of a matrix.

Description

colSums and rowSums of the returned matrix are all equal to zero.

Usage

bicenter(m)

Arguments

m

a numeric matrix

Details

Inspired from the algorithm described in stackoverflow https://stackoverflow.com/questions/43639063/double-centering-in-r

Value

a numeric matrix centred by rows and columns

Author(s)

Eric Coissac

Christelle Gonindard-Melodelima

Examples

data(bacteria)
bact_bc <- bicenter(bacteria)
sum(rowSums(bact_bc))
sum(colSums(bact_bc))


[Package ProcMod version 1.0.8 Index]