rowScales {scrime} | R Documentation |
Rowwise Scaling
Description
Scales each row of a matrix such that the values in this row have zero mean and a standard deviation of 1.
Usage
rowScales(X, add.stats = FALSE)
Arguments
X |
a numeric matrix whose rows should be scaled. Missing values are allowed. |
add.stats |
should the rowwise means and standard deviations of |
Value
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.
Author(s)
Holger Schwender, holger.schwender@udo.edu
See Also
Examples
## 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)
[Package scrime version 1.3.5 Index]