col01scale | R Documentation |
col01scale
and colcenter
(re)scale the columns of a
matrix. These are simple one-line utilities, mainly with a didactical
purpose.
colcenter (mat)
col01scale(mat, scale.func = function(x) diff(range(x)), location.func = mean)
mat |
numeric matrix, to rescaled. |
scale.func , location.func |
two functions mapping a numeric vector to a single number. |
a matrix with the same attributes as the input mat
.
Martin Maechler
The standard R function scale()
.
## See the simple function definitions:
colcenter ## simply one line
col01scale# almost as simple
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.