wins | R Documentation |
Winsorise either by number or percentage of observations.
wins(x, p = 0.05)
colWins(x, p = 0.05)
rowWins(x, p = 0.05)
x |
input data. NAs will be removed. |
p |
percentage or number of observations to be winsorised. If value is <1 then it is used as a percentages. Otherwise it is the number of observations to winsorise. If the resulting p > floor((length(x)-1)/2), then it is set equal to floor((length(x)-1)/2). |
Winsorised vector.
colWins()
: Vectorised version of wins by columns.
rowWins()
: Vectorised version of wins by rows.
Nikolaos Kourentzes, nikolaos@kourentzes.com.
x <- rnorm(100,mean=0,sd=1)
xW <- wins(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.