powered by
Weighted population median.
weighted_median(x, w, na.rm = FALSE)
Weighted estimate of the population median
[numeric vector] data.
[numeric vector]
[numeric vector] weights (same length as x).
x
[logical] indicating whether NA values should be removed before the computation proceeds (default: FALSE).
[logical]
NA
FALSE
Weighted sample median; see weighted_quantile for more information.
weighted_quantile
Overview (of all implemented functions)
head(workplace) weighted_median(workplace$employment, workplace$weight)
Run the code above in your browser using DataLab