Scales values using quantiles instead of min/max for robustness to outliers.
Value
Numeric vector scaled approximately to the range 0 to 1, with outliers potentially outside this range
Examples
# With outliers
x <- c(1, 2, 3, 4, 5, 100) # 100 is an outlier
normalize_robust(x)
#> [1] -0.003333333 0.010000000 0.023333333 0.036666667 0.050000000
#> [6] 1.316666667