fct_reorder

Order factor levels by another vector

Reorders factor levels using summary statistics computed from a companion numeric vector.