title: R reshape a data frame to get the total number of appearance of an observation
body: <p>I am thinking about how to reshape a data frame like this:</p>
  
  <pre><code>id type points times
  1   A    3       1
  2   B    3       2
  3   A    3       3
  4   B    2       4
  5   A    1       5
  </code></pre>
  
  <p>to this :</p>
  
  <pre><code>points   A    B
  1        5    0
  2        0    4
  3        4    2
  </code></pre>
  
  <p>So, I want to make the points and types be the column, and count the total number of appearance of a point in all types.</p>