rank_values_with_clusters function

Rank a vector based on clusters