Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bicenter.wt

Double Weighted Centring


Description

This function creates a doubly centred matrix.

Usage

bicenter.wt(X, row.wt = rep(1, nrow(X)), col.wt = rep(1, ncol(X)))

Arguments

X

a matrix with n rows and p columns

row.wt

a vector of positive or null weights of length n

col.wt

a vector of positive or null weights of length p

Value

returns a doubly centred matrix

Author(s)

Daniel Chessel

Examples

w <- matrix(1:6, 3, 2)
bicenter.wt(w, c(0.2,0.6,0.2), c(0.3,0.7))

w <- matrix(1:20, 5, 4)
sum(bicenter.wt(w, runif(5), runif(4))^2)

ade4

Analysis of Ecological Data: Exploratory and Euclidean Methods in Environmental Sciences

v1.7-16
GPL (>= 2)
Authors
Stéphane Dray <stephane.dray@univ-lyon1.fr>, Anne-Béatrice Dufour <anne-beatrice.dufour@univ-lyon1.fr>, and Jean Thioulouse <jean.thioulouse@univ-lyon1.fr>, with contributions from Thibaut Jombart, Sandrine Pavoine, Jean R. Lobry, Sébastien Ollier, Daniel Borcard, Pierre Legendre, Stéphanie Bougeard and Aurélie Siberchicot. Based on earlier work by Daniel Chessel.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.