Weighted Median
Calculates weighted median. For odd sample sizes consistent with unweighted quantiles.
weighted_median(x, w = NULL, ...)
x |
Numeric vector. |
w |
Optional non-negative case weights. |
... |
Further arguments passed to |
n <- 21 x <- seq_len(n) quantile(x, probs = 0.5) weighted_median(x, w = rep(1, n)) weighted_median(x, w = x) quantile(rep(x, x), probs = 0.5)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.