[R] Sorting a matrix on two columns

Spencer Graves spencer.graves at pdf.com
Mon Feb 21 06:11:42 CET 2005


    Have you considered "order"?  The help file includes examples from 
which you should be able to see how to do what you want. 

      hope this helps. 
      spencer graves    

Jones, Glen R wrote:

>Hello,
>
>If a matrix with 5 columns has been defined and the first two columns
>need to be sorted in ascending order, how can this be achieved whilst
>ensuring the 
>other 3 columns data are in relative position to the sorted columns?
>
>
>Glen Jones
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>  
>




More information about the R-help mailing list