trimmed_quantile: Trimmed Quantiles

Description Usage Arguments Author(s) Examples

Description

For data X = x1, x2, ..., xn, with order statistics x(1), x(2), ..., x(r) return the quantiles for a trimmed data set, e.g., X \ x(1), x(r) (trim = 1), or X \ x(1), x(2), x(r-1), x(r) (trim = 2).

Usage

1
trimmed_quantile(x, trim = 1L, use_unique = TRUE, ...)

Arguments

x

a numeric vector

trim

defaults to 1, omitting the min and the max

use_unique

logical, if true (defaults), base the quantiles on unique values, if false, base the quantiles on all data, after trimming.

...

other arguments to pass to stats::quantile

Author(s)

Peter DeWitt dewittpe@gmail.com

Examples

1
2
3
4
5
6
7
trimmed_quantile(1:100, prob = 1:23 / 24, name = FALSE)

# Warning
# trimmed_quantile(1:100, trim = .3, prob = 1:23 / 24, name = FALSE)

# no warning
trimmed_quantile(1:100, trim = 3, prob = 1:23 / 24, name = FALSE)

cpr documentation built on May 1, 2019, 10:46 p.m.