title: Transform 3 rows into 3 columns
body: <p>I have a dataset where I would like to melt 3 repeated rows into one rows with 3 columns:</p>
  
  <pre><code>&gt; tail(days,12)
          Result       type count
  412  Cancelled  D_(27,32]   122
  413     Failed  D_(27,32] 11113
  414 Successful  D_(27,32]   141
  415  Cancelled  E_(27,32]   133
  416     Failed  E_(27,32]  8266
  417 Successful  E_(27,32]   104
  418  Cancelled  F_(27,32]    92
  419     Failed  F_(27,32]  7973
  420 Successful  F_(27,32]    90
  421  Cancelled HR_(27,32]   328
  422     Failed HR_(27,32] 33697
  423 Successful HR_(27,32]   298
  </code></pre>
  
  <p>I would like to have like this:</p>
  
  <pre><code>       type     Cancelled Failed Successful
      D_(27,32]   122       11113     141
  </code></pre>
  
  <p>I could use <code>apply</code>, but I'm sure there is something like <code>melt</code> which might solve my problem.</p>