I often have to find ranks of values in a list. However, Mathematica does not have built-in functions for that, or may be I'm just not aware of them. I can easily find ranks of a row/column vector. For example, if I have
list1 = RandomInteger[{1, 10}, 10] ; then Ordering[Ordering[list1]] gives me its rank. I have also written a following function that does my job.
Rankme[list_] := Module[{rank}, rank = ConstantArray[0, Length[list]]; rank[[Ordering[list]]] = Range[1, Length[list]] ; rank ] Rankme[list1] gives me ranks of values in the list1 . However, I am trying to find column-wise ranks of a list that has more than one column. For example, I have
list2 = RandomInteger[{1, 10}, {10, 5}]; I want to find column-wise ranks of values in the list2. How can I do this?
