trim.sample: Trim a vector of numbers

View source: R/trim.sample.R

trim.sampleR Documentation

Trim a vector of numbers

Description

Symmetrically trim a vector of numbers after sorting it.

Usage

trim.sample(x, trim = 0.05)

Arguments

x

A numeric vector.

trim

A number, the fraction of observations to be trimmed from each end of x.

Details

If length(x) <= 10, the function returns x[2:(length(x) - 1)].

Value

A sorted, trimmed copy of x.

Examples

trim.sample(
    x = 1:20,
    trim = 0.05
    );

OutSeekR documentation built on April 11, 2025, 5:39 p.m.