Weighted quantiles
weighted_quantile.RdComputes weighted quantiles using a type-7 analog: observations are placed
at the midpoints of their weight intervals in the cumulative weight
distribution, rescaled to [0, 1], and quantiles are obtained by linear
interpolation. For equal weights this matches quantile(x, type = 7).
Usage
weighted_quantile(x, w, probs = seq(0, 1, 0.25), na.rm = FALSE)