safescale | R Documentation |
Equivalent to 'base::scale', but handling missing values and null variance a bit more elegantly.
safescale(x, center = TRUE, byRow = FALSE)
x |
A matrix. |
center |
Logical, whether to center values. |
byRow |
Logical, whether to scale by rows instead of columns. |
A scaled matrix.
m <- matrix(rnorm(100), nrow=10)
m.scaled <- safescale(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.