weighted.quantile() produces weighted sample quantiles corresponding to the given probabilities.
weighted.quantile(
x,
w = NULL,
probs = seq(0, 1, 0.25),
na.rm = FALSE,
names = TRUE,
digits = 7L,
type = 1L,
...
)weighted.quantile() returns weighted sample quantiles corresponding to the given probabilities.
a numeric vector whose weighted sample quantiles are wanted.
a numeric vector of the sample weights for each value in x.
a numeric vector of probabilities with values in [0, 1].
logical. If TRUE, any NA and NaNs are removed from x before the quantiles are computed.
logical. If TRUE, the result has a "names" attribute.
used only when names is TRUE. The precision to use when formatting the percentages.
an integer between 1 and 9 selecting the quantile algorithms. Only 1 is available for the weighted quantile.
further arguments passed to stats::quantile() when weights are not passed.
weighted.quantile() is a wrapper function of stats::quantile() for weighted quantiles.
For the weighted quantile, only the "type 1" quantile, the inverse of the empirical distribution function, is available.
This function is used in numeric.encoder() to enable weights-based encoding.
weighted.tabulate