## generate data
set.seed(1234) # for reproducibility
x <- rnorm(10) # standard normal
x[1] <- x[1] * 10 # introduce outlier
## Trim data
x
Trim(x, trim=0.1)
## Trim fixed number, say cut the 3 extreme elements from each end
Trim(x, trim=3)
Run the code above in your browser using DataLab