scale_between_quantiles: scale an array of numerics between 0~1, thresholding values...

View source: R/util_generic.R

scale_between_quantilesR Documentation

scale an array of numerics between 0~1, thresholding values at lower/upper quantiles non-finite values are ignored (not replaced). example: x=rnorm(1000); hist(x); hist(scale_between_quantiles(x, min_quantile=0.01, max_quantile = 0.99))

Description

edge-case; if either lower or upper quantile could not be determined, all finite values of x will be set to 1 edge-case; if all non-finite input values are the same, the upper and lower quantiles are the same. All finite values of x will be set to 1

Usage

scale_between_quantiles(x, min_quantile = 0.01, max_quantile = 0.99)

Arguments

x

values to transform

min_quantile

lower quantile, used as parameter in quantile()

max_quantile

upper quantile, used as parameter in quantile()


ftwkoopmans/msdap documentation built on March 5, 2025, 12:15 a.m.