clip_fun | R Documentation |
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.
clip_fun(lower = 0.05, upper = 0.95)
lower |
numeric. The probability for the lower quantile, defaults to '0.05'. |
upper |
numeric. The probability for the upper quantile, defaults to '0.95'. |
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.
rglactions
rglactions = list("trans_fun"=clip_fun(0.10, 0.90));
rglactions = list("trans_fun"=clip_fun());
f = clip_fun();
f(rnorm(100));
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.