Converting a data frame to table
<p>I have a data frame in the following format:</p>

<pre><code> state1     state2     score
   A          A          3
   A          B          13
   A          C          5
   B          A          1
   B          B          0
   B          C          0
   C          A          5
   C          B          6
   C          C          3
</code></pre>

<p>I would like to convert it to a table:</p>

<pre><code>      A     B     C
A     3     13    5 
B     1     0     0
C     5     6     3
</code></pre>

<p>Is there an easy way of doing this other than manually?</p>