title: How to aggregate categorical data in R?
body: <p>I have a dataframe which consists of two columns with categorical variables (Better, Similar, Worse). I would like to come up with a table which counts the number of times that these categories appear in the two columns. 
  The dataframe I am using is as follows:</p>
  
  <pre><code>       Category.x  Category.y
  1      Better      Better
  2      Better      Better
  3      Similar     Similar
  4      Worse       Similar
  </code></pre>
  
  <p>I would like to come up with a table like this:</p>
  
  <pre><code>           Category.x    Category.y
  Better     2             2
  Similar    1             2
  Worse      1             0
  </code></pre>
  
  <p>How would you go about it?</p>