title: R: turn row values into column names and count its assigned values
body: <p>I have a dataframe that looks like this:</p>
  
  <pre><code>data.frame(name=c("a","a","b","b","c"),
  value=c("2011-01-23","2011-01-23","2011-01-23","2011-01-22","2011-01-22"))
  
  name     value
   a        2011-01-23
   a        2011-01-23
   b        2011-01-23
   b        2011-01-22
   c        2011-01-22
  </code></pre>
  
  <p>I only have 3 different names, and I would like to turn it into:</p>
  
  <pre><code>a    b   c   date
  2    1   0    2011-01-23
  0    1   1    2011-01-22
  </code></pre>
  
  <p>I looked at the reshape package, but I couldn't understand the documentation well enough to solved this.</p>