Rowwise Scaling
Scales each row of a matrix such that the values in this row have zero mean and a standard deviation of 1.
rowScales(X, add.stats = FALSE)
X |
a numeric matrix whose rows should be scaled. Missing values are allowed. |
add.stats |
should the rowwise means and standard deviations of |
If add.stats = FALSE
, a matrix of the same dimensions as X
with a rowwise mean of zero and a rowwise standard deviation of 1.
If add.stats = TRUE
, a list containing this matrix and the
rowwise means and standard deviations of the input matrix.
Holger Schwender, holger.schwender@udo.edu
## Not run: # Generate a matrix containing data for 10 categorical # variables with levels 1, 2, 3. mat <- matrix(sample(3, 500, TRUE), 10) rowScales(mat) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.