Compute weighted quantile
wtd.quantile (x, q=0.5, na.rm = FALSE, weight=NULL)
Returns an empirical q quantile from a weighted sample.
Vector of data, same length as
Quantile to compute
Logical: Should NAs be stripped before computation proceeds?
Vector of weights. If NULL, the default, weights are not used.
Uses a simple algorithm based on sorting.