[R] order function give back row name

Martin Bauer Bauermartin at gmx.at
Fri Dec 2 20:45:13 CET 2011


Hello,


I have a matrix results with dimension 1x9 double matrix

         XLB	   XLE	           XLF	       XLI
1	53.3089  55.77923	37.64458     83.08646

I'm trying to order this matrix 

> print(order(results))
[1] 3 1 2 4 

how can the function order return the columnname XLF   XLB   XLE  XLI  instead of 3 1 2 4 

any idea ?

Thank you in advance
--



More information about the R-help mailing list