Description Usage Arguments Details Value See Also Examples
gscale standardize the values in a matrix. This is a matrix version of
scale in the R package base.
1 |
mat |
a matrix to be transformed. |
center |
a logical value indicating whether centering should be done.
The default value is |
scale |
a logical value indicating whether scaling should be done. The
default value is |
diag |
Whether the diagonal value is considered or not. The defalt value
is |
This function first vectrizes the values in a matrix and then passes to the
scale function in R package base. The returned values are then
converted into the original matrix format. If center is TRUE,
then centering is done by subtracting the means (omitting NAs) of the
matrix from the original values in the matrix. If scale is
TRUE, then scaling is done by dividing the (centered) values in the
matrix by their standard deviations if center is TRUE, and the
root mean square otherwise. If scale is FALSE, no scaling is done.
If diag is TURE, the diagonal values are included for the
transformation.
a scaled matrix defined by the scaling method.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.