scalewt {ade4} | R Documentation |
transforms a numeric matrix in a centred and scaled matrix for any weighting.
scalewt(X, wt = rep(1, nrow(X)), center = TRUE, scale = TRUE)
X |
a numeric matrix (like object) |
wt |
a vector of weighting |
center |
a logical value indicating whether the array should be centred |
scale |
a logical value indicating whether the array should be scaled |
returns a centred, scaled matrix
The norms are calculated with 1/n and the columns of null variance are still equal to zero.
Daniel Chessel chessel@biomserv.univ-lyon1.fr
scalewt(matrix(1:12,4,3)) scale((matrix(1:12,4,3))) scale(matrix(1,4,3)) scalewt(matrix(1,4,3))