topcode: Top-coding values in a vector

Description Usage Arguments Details Value Examples

Description

Top-coding values in a vector

Usage

1
topcode(x, probs = 0.99)

Arguments

x

numeric vector

probs

scalar of the quantile cut-point.

Details

This function sets all values larger than the selected quantile to the largest value of the remaining values.

Value

vector top-coded vector.

Examples

1
2
3
4
5
6
7
 ## Not run: 

 x <- sort(rnorm(10))
 topcode(x)
 
 
## End(Not run)

sumtxt/datatools documentation built on May 30, 2019, 8:38 p.m.