Compute weighted median.
wtd.median (x, na.rm = FALSE, weight=FALSE)
Vector of data, same length as weight
Logical: Should NAs be stripped before computation proceeds?
Vector of weights
Returns an empirical .5 quantile from a weighted sample.
Uses a simple algorithm based on sorting.