cap_outliers: cap_outliers
Description
Caps the outliers of a numeric vector by percentiles. Also outputs a plot of the capped distribution
Usage
cap_outliers(x, q = 0.05, type = c("both", "upper", "lower"))Arguments
- x
numeric vector
- q
decimal input to the quantile function to set cap. default .05 caps at the 95 and 5th percentile
- type
chr vector. where to cap: both, upper, or lower
Examples
Run this code
cap_outliers(iris$Petal.Width)
Run the code above in your browser using DataLab