robust_zscore {cmapR} | R Documentation |
robust zscore implementation takes in a 1D vector, returns 1D vector after computing robust zscores rZ = (x-med(x))/mad(x)
robust_zscore(x, min_mad = 1e-06, ...)
x |
numeric vector to z-score |
min_mad |
the minimum allowed MAD, useful for avoiding division by very small numbers |
... |
further options to median, max functions |
transformed version of x
(x <- rnorm(25)) (robust_zscore(x)) # with min_mad (robust_zscore(x, min_mad=1e-4))