I have a huge data size:
SN = c(1:100, 1:100, 1:100, 1:100) class = c(rep("A1", 100), rep("B2", 100), rep("C3", 100), rep("D4", 100)) # total 6000 levels myvar = rnorm(400) mydf = data.frame(SN, class, myvar)
I want to “not melt” the table with each level as one column and myvar in the fill:
SN A1 B2 C3 D4 .............and so on for all 6000
How can I achieve this, I know this is a simple question, but I could not understand.
r dataframe reshape
jon Oct 19 '11 at 20:37 2011-10-19 20:37
source share