winsorize: Winsorize Function

Description Usage Arguments Value Examples

View source: R/winsorize.R

Description

This function truncates vector to the fractionth-ile elements from the top and the bottom

Usage

1
winsorize(x, fraction)

Arguments

x

numeric vector of real numbers

Value

numeric vector of x with all elements below the franctionth percentile truncated to the limiting value from the top and bottom

Examples

1
2
3
4
5
set.seed(1)
x <- rnorm(10)
x <- sort(x)
x
winsorize(x,0.2)

GarrettMooney/moonmisc documentation built on Oct. 19, 2019, 7:51 p.m.