sortBy package:statistics

Sort a vector using a custom ordering.