weighted.quant {Rrepest} | R Documentation |
Computation of weighted quantiles
weighted.quant(x, w = rep(1, length(x)), q = 0.5)
x |
(numeric vector) variable from where to get quantiles |
w |
(numeric vector) vector of weights |
q |
(numeric vector) From 0 to 1 (exclusive) for the quantile desired |
Weighted quantile of a numeric vector
weighted.quant(x = mtcars$mpg, w = mtcars$wt, q = seq(.1,.9,.1))