robust_zscore: Compoute robust z-scores

Description Usage Arguments Value Examples

View source: R/math.R

Description

robust zscore implementation takes in a 1D vector, returns 1D vector after computing robust zscores rZ = (x-med(x))/mad(x)

Usage

1
robust_zscore(x, min_mad = 1e-06, ...)

Arguments

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

Value

transformed version of x

Examples

1
2
3
4
5
(x <- rnorm(25))
(robust_zscore(x))

# with min_mad
(robust_zscore(x, min_mad=1e-4))

cmapR documentation built on Dec. 12, 2020, 2 a.m.