[R] Moving a Data Frame Column

jimdare jamesdare26 at gmail.com
Thu Jan 15 04:47:39 CET 2009


Dear R-Users
if I have a data frame (or zoo data) as follows:

Run  Bike Walk Drive
1       2      7     5
5       2      4     2 
8       3      2     1

How can I re-order it so that it reads:  

Drive Run  Bike Walk 
  5      1      2     7   
  2      5      2     4    
  1      8      3     2   
i.e. "Drive" has been copied and pasted to the left most column.

Thanks for your help.

James
-- 
View this message in context: http://www.nabble.com/Moving-a-Data-Frame-Column-tp21470798p21470798.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list