View source: R/inequalityMeasure.R
| Quantile | R Documentation |
Computes quantile derived for the given probability taking into account weights.
Quantile(X, W = rep(1, length(X)), p = 0.5)
X |
is a numeric data vector |
W |
is a vector of weights |
p |
is a probability to derive corresponding quantile |
Linear interpolation is applied to deal with a frequency distribution.
The quantile for weighted data.
# Compare weighted and unweighted result
X=1:10
W=10:1
Quantile(X,p=0.5)
Quantile(X,W,p=0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.