title: Reshape three column data frame to matrix ("long" to "wide" format)
body: <p>I have a <code>data.frame</code> that looks like this.</p>
  
  <pre><code>x a 1 
  x b 2 
  x c 3 
  y a 3 
  y b 3 
  y c 2 
  </code></pre>
  
  <p>I want this in matrix form so I can feed it to heatmap to make a plot.  The result should look something like:</p>
  
  <pre><code>    a    b    c
  x   1    2    3
  y   3    3    2
  </code></pre>
  
  <p>I have tried <code>cast</code> from the reshape package and I have tried writing a manual function to do this but I do not seem to be able to get it right.</p>