scalewt {ade4} | R Documentation

## Centring and Scaling a Matrix of Any Weighting

### Description

transforms a numeric matrix in a centred and scaled matrix for any weighting.

### Usage

    scalewt(X, wt = rep(1, nrow(X)), center = TRUE, scale = TRUE)

### Arguments

`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

### Value

returns a centred, scaled matrix

### Note

The norms are calculated with 1/n and the columns of null variance are still equal to zero.

### Author(s)

Daniel Chessel chessel@biomserv.univ-lyon1.fr

### Examples

    scalewt(matrix(1:12,4,3))
    scale((matrix(1:12,4,3)))
    scale(matrix(1,4,3))
    scalewt(matrix(1,4,3))

[Package Contents]