Description Usage Arguments Value Examples
Matrix scaling by centering columns separately and then performing variance scaling on the whole matrix, in a NA-robust fashion. With the default arguments, the output will be the number of (matrix-)median absolute deviations from the column-median.
1 2 3 4 5 | colCenterScale(
x,
centerFn = median,
scaleFn = function(x, na.rm) median(abs(x), na.rm = na.rm)
)
|
x |
A numeric matrix. |
centerFn |
The function for calculating centers. Should accept the 'na.rm' argument. E.g. 'centerFn=mean' or 'centerFn=median'. |
scaleFn |
The function for calculating the (matrix-wise) scaling factor. Should accept the 'na.rm' argument. Default 'median(abs(x))'. |
A scaled matrix of the same dimensions as 'x'.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.