I have huge dataframe like this:

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 "unmelt" to a table with each level as single column and myvar in filled:

SN          A1            B2          C3         D4       .............and so on for all 6000 

How can I achieve this, I know it is simple question, but I could not figure out.

Edit
Report