title: Rearrange dataframe to a table, the opposite of "melt"
body: <p>I have huge dataframe like this:</p>
  
  <pre><code>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) 
  </code></pre>
  
  <p>I want to "unmelt" to a table with each level as single column and myvar in filled:</p>
  
  <pre><code>SN          A1            B2          C3         D4       .............and so on for all 6000 
  </code></pre>
  
  <p>How can I achieve this, I know it is simple question, but I could not figure out.</p>