scale_med | R Documentation |
Centers and scales the columns of a matrix robustly
scale_med(mat, TOL = 1e-08, drop_const = TRUE, doRows = FALSE)
mat |
A numeric matrix. Its columns will be centered and scaled. |
TOL |
Columns with MAD below this value will be considered constant.
Default: |
drop_const |
Drop constant columns? Default: |
doRows |
Center and scale the rows instead? Default: |
Centers each column on its median, and scales each column by its median
absolute deviation (MAD). If there are constant-valued columns, they are
removed if drop_const
or set to NA
if !drop_const
, and
a warning is raised. If all columns are constant, an error is raised.
The input matrix with its columns centered and scaled.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.