[R] Rank - Descending order
Manoj - Hachibushu Capital
Wanzare at HCJP.com
Tue Apr 20 06:53:48 CEST 2004
Dear All,
Is there any simple way to way to produce "rank", for a given
list, but in a descending order?
E.G:
x = list(a=c(1,5,2,4));
rank(x$a); produces 1,4,2,3
However I am looking for a way to generate (4,1,3,2).
It would be particularly nice if the proposed solution has all
the niceties of rank function (like NA handling and ties.method
functionality)
TIA
Manoj
More information about the R-help
mailing list