Michael Williams Michael Williams - 1 year ago 92
R Question

Is there a weighted.median() function for R?

I'm looking for something similar in form to weighted.mean(). Sorry for posting such a banal question... new to R. I've found some solutions via search that write out the entire function but would appreciate something a bit more user friendly.

Answer Source

The following packages all have a function to calculate a weighted median: 'aroma.light', 'isotone', 'limma', 'cwhmisc', 'ergm', 'laeken', 'matrixStats, 'PSCBS', and 'bigvis' (on github).

To find them I used the invaluable findFn() in the 'sos' package which is an extension for R's inbuilt help.

findFn('weighted median')


???'weighted median'

as ??? is a shortcut in the same way ?some.function is for help(some.function)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download