weightedQuantile | R Documentation |
Computes a weighted quantile of a numeric vector.
## Default S3 method:
weightedQuantile(x, w, probs=c(0, 0.25, 0.5, 0.75, 1), na.rm=TRUE,
method=c("wtd.quantile"), ...)
x |
a |
w |
a numeric |
probs |
a |
na.rm |
a |
method |
If |
... |
Additional arguments passed to the estimator. |
Returns the weighted quantile.
Henrik Bengtsson
Internally the following functions may be used:
quantile
(if no weights are specified), or an internal
copy of Hmisc::wtd.quantile()
.
For a weighted median estimator, weightedMedian
of the matrixStats package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.