View source: R/zscore_winsorized.R
zscore_winsorized | R Documentation |
This function normalizes a numeric vector to z-scores (mean of 0 and standard deviation of 1), with values beyond a specified threshold winsorized (capped at a maximum absolute value). It ignores NA values in the calculation of mean and standard deviation, but returns NAs in the output vector.
zscore_winsorized(x, threshold = 3)
x |
numeric vector to be normalized |
threshold |
the maximum absolute value to which the vector will be winsorized |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.