Given a vector of values, calculates the weighted median

calcTabMedianInsert(vec, var_cats)

Arguments

vec

A vector to use for calculation (a single dimension of an array)

var_cats

The `Categories` object that corresponds to the vector in `vec`

Value

The weighted median of the numeric values of `var_cats` given the weights in `vec`