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]]