[R] sorting ascending descending! & THX@coling
    Thomas Vogels 
    tov at ece.cmu.edu
       
    Fri Jan 12 20:09:33 CET 2001
    
    
  
Witold Eryk Wolski <wolski at molgen.mpg.de> writes:
> THX.
> You are right!!
> 
> 
>  a[order(-1*a)]
> [1] 110  23   4   3   2
> 
> 
> Eryk
hmm, I would have thought rev(order(...)) to be more intuitive:
x[order(x)] sorts in ascending order,
x[rev(order(x))] sorts in descending order...
Enjoy,
  -tom
-- 
mailto:tov at ece.cmu.edu (Tom Vogels)   Tel: (412) 268-6638   FAX: -3204
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
    
    
More information about the R-help
mailing list