Skip to content
Prev 19560 / 398500 Next

function sort.list()

Ole Christensen wrote:
Both functions give correct results, they just do different things!
rank() gives you the ranks, order() returns what is sometimes also
called anti-ranks. Type
R> c(0, 2, 10, 11, 4)[order(c(0, 2, 10, 11, 4))]
to see what it does. It can be used to rearrange matrices for example.
See help(order) for further examples.
Z
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._