[R] Reformatting a table

From: Tul Gan <tulgan_at_ymail.com>
Date: Thu, 20 Nov 2008 12:28:41 -0800 (PST)


Hi !
           I am new to R. Can somebody help me in reformatting huge output files ,i.e, rearranging sets of columns in specific order.
For example: I have data for three compunds 1, 2 and 3 file1:
ID CA1 CA3 CA2 MA2 MA1 MA3
1 14 15 13 7 12 3
2 19 7 12 10 14 5
3 21 12 19 6 8 9
 

to
File 2:
 

ID CA1 CA2 CA3 MA1 MA2 MA3
1 14 13 15 12 7 3
2 19 12 7 14 10 5
3 21 19 12 8 6 9
 

or File3:
ID CA1 MA1 CA2 MA2 CA3 MA3
1 14 12 13 7 15 3
2 19 14 12 10 7 5
3 21 8 19 6 12 9
 

Thanks for your help,
Tul Gan



Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 20 Nov 2008 - 20:36:17 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 20 Nov 2008 - 22:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive