Description Usage Arguments Details Value See Also Examples
Compute the quantiles of x
weighted by weights
.
1 | wtd_quantile(x, probs, weights = NULL)
|
x |
a numerical vector. |
probs |
a numerical vector with the quantile probabilities. |
weights |
a numerical vector of weights the same length as |
If weights
is NULL
, all elements of x
receive the
same weight. Observations with zero weights are omitted from the
computation. Missing values are not handled specially and
produce missing values as the result.
A numeric
vector with the weighted quantiles of x
.
Other weighted statistics:
wtd_mean()
,
wtd_median()
1 | wtd_quantile(1:5, weights = 5:1, probs = (1:4)/5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.