Get data clipping function to use in rglactions as 'trans_fun' to transform data. This is typically used to limit the colorbar in a plot to a certain range. This uses percentiles to clip. Clipping means that values more extreme than the gíven quantiles will be set to the quantile values.
Usage
clip_fun(lower = 0.05, upper = 0.95)
Value
a function that takes as argument the data, and clips it to the requested range. I.e., values outside the range will be set to the closest border value. Designed to be used as rglactions$trans_fun in vis functions, to limit the colorbar and data range.
Arguments
lower
numeric. The probability for the lower quantile, defaults to `0.05`.
upper
numeric. The probability for the upper quantile, defaults to `0.95`.