Learn R Programming

PCRA (version 1.2)

winsorize: Winsorize Data

Description

This function Winsorizes a fraction gamma of a numeric data set.

Usage

winsorize(x, fraction = 0.1)

Value

The Winsorized numeric data

Arguments

x

A numeric data set

fraction

A fraction greater than 0 and less than 0.5

Details

The Winsorized data is obtained by by setting the gamma smallest data values equal to the next smallest value, and setting the gamma largest data values equal to the next largest data value.

Examples

Run this code
x <- rt(10,8)
winsorize(x,0.2)

Run the code above in your browser using DataLab