weighted.quantile: Compute quantiles of weighted data.

Description Usage Arguments Details See Also Examples

Description

Compute quantiles of weighted data.

Usage

1
weighted.quantile(x, w, probs = seq(0, 1, 0.25), na.rm = FALSE)

Arguments

x

numeric vector of observations

w

integer vector of weights, representing the number of time each x was observed

probs

numeric vector of probabilities between 0 and 1

na.rm

If TRUE will automatically remove missing values in x or w.

Details

Currently only implements the type 7 algorithm, as described in quantile. Based on quantile written by R-core.

See Also

Other weighted statistics: weighted.ecdf; weighted.sd, weighted.var

Examples

1
2
3
x <- runif(200)
w <- rpois(200, 5) + 1
weighted.quantile(x, w)

hadley/bigvis documentation built on May 17, 2019, 9:45 a.m.