which.quantile: indices of quantiles

Description Usage Arguments Value Author(s) See Also Examples

Description

Similar to which.min and which.max. The indices correspond to quantile type 3.

Usage

1
which.quantile(x, probs, na.rm = FALSE)

Arguments

x

data

probs

which quantiles to return

na.rm

should NAs be removed before?

Value

vector of indices corresponding to the quantiles

Author(s)

Claudia Beleites

See Also

quantile

Examples

1
2
3
4
5
6
x <-c (2.34, 5.83, NA, 9.34, 8.53, 6.42, NA, 8.07, NA, 0.77)
probs <- c (0, .23, .5, .6, 1)

which.quantile (x, probs, na.rm = TRUE)

x [which.quantile (x, probs, na.rm = TRUE)] == quantile (x, probs, na.rm = TRUE, type = 3)

cbmisc documentation built on May 2, 2019, 5:20 p.m.