Description Usage Arguments Value Examples
View source: R/global_processing.R
Normalize a numeric vector by rescaling and Winsorizing, i.e. rescale the middle of the data to the range [0, 1] and bound the upper tail to 1 and the lower tail to 0, effectively replacing a fixed amount of extreme values in each tail. Similar to trimming the tails except instead of discarding the tails entirely they're bounded.
1 | winsorNorm(x, trim)
|
x |
A numeric vector, the data to be normalized |
trim |
Numeric, a fraction in [0, 1] specifying how much of the data to bound to 0 (for the lower tail) or 1 (for the upper tail) |
Numeric vector
1 2 3 4 5 | x <- seq(1, 100, by = 1)
x
# Bound the lower and upper 5% of values in the vector
winsorNorm(x, trim = 0.05)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.