[R] Arrange Data

From: Sachin J <sachinj.2006_at_yahoo.com>
Date: Mon 02 Apr 2007 - 16:26:32 GMT


Hi,

I have following data set and want to arrange as follows.

structure(list(C1 = structure(c(1, 1, 1, 2, 2, 2, 3, 3, 3, 4,

4, 4), .Label = c("B", "C", "D", "E"), class = "factor"), C2 = c(34, 
4, 54, 3, 23, 33, 2, 12, 33, 12, 10, 4)), .Names = c("C1", "C2"
), class = "data.frame", row.names = c("1", "2", "3", "4", "5", 
"6", "7", "8", "9", "10", "11", "12"))

OUTPUT:
            B C E D 343212
4231210
5433334

Please let me know how can I can accomplish this in R.

TIA
Sachin  


        [[alternative HTML version deleted]]



R-help@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 and provide commented, minimal, self-contained, reproducible code. Received on Tue Apr 03 02:32:23 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 02 Apr 2007 - 17:30:37 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.