sorting ascending descending?
On Fri, 12 Jan 2001, Witold Eryk Wolski wrote:
HI! By xx[order(xx)] I can sort the array ascendin. How to sort them descending. eg.:
a<-c(2,3,110,23,4) a[order(a)]
[1] 2 3 4 23 110 but i wont. [1] 110 23 4 3 2
You can do: a[order(-a)] Ramón
Ramón DÃaz-Uriarte
Triana 47
28016 Madrid
Spain
email:ramon-diaz at teleline.es
Phone: +-34-918-513-966
+-34-657-186-407
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._