View source: R/weighted_quantile.R
weighted.quant | R Documentation |
Computes weighted quantiles of a numeric vector.
weighted.quant(x, w = rep(1, length(x)), q = 0.5)
x |
(numeric vector) Variable of interest for which to compute the quantile |
w |
(numeric vector) Vector with the weights |
q |
(numeric vector) A number between 0 and less than 1 indicating the desired quantile |
Scalar containing the quantile
weighted.quant(x = mtcars$mpg, w = mtcars$wt, q = seq(.1,.9,.1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.