Clean data by means of trimming, i.e., by omitting
outlying observations.
Usage
Trim(x, trim = 0.1, na.rm = FALSE)
Arguments
x
a numeric vector to be trimmed.
trim
the fraction (0 to 0.5) of observations to be trimmed from each end of x before the mean is computed. Values of trim outside that range are taken as the nearest endpoint.
na.rm
a logical value indicating whether NA values should be stripped before the computation proceeds.
Value
If trim is non-zero, a symmetrically trimmed vector x with a fraction of trim observations deleted from each end will be returned.
The result vector will be sorted.