title: dplyr: apply function table() to each column of a data.frame
body: <h3>Apply function table() to each column of a data.frame using dplyr</h3>
  
  <p>I often apply the table-function on each column of a data frame using <em>plyr</em>, like this:</p>
  
  <pre><code>library(plyr)
  ldply( mtcars, function(x) data.frame( table(x), prop.table( table(x) ) )  )
  </code></pre>
  
  <p>Is it possible to do this in <em>dplyr</em> also?</p>
  
  <p>My attempts fail:</p>
  
  <pre><code>mtcars %&gt;%  do( table %&gt;% data.frame() )
  melt( mtcars ) %&gt;%  do( table %&gt;% data.frame() )
  </code></pre>