title: Count number of occurrences of categorical variables in data frame (R)
body: <p>I have data frame:</p>
  
  <pre><code>station     date        classification
   1    June - 01/16          A
   2    June - 03/16          B
   1    June - 01/16          A
   7    June - 01/16          C
   1    June - 03/16          A
   2    June - 03/16          B
   2    June - 03/16          B
  </code></pre>
  
  <p>I want to get the total number of occurrences of A, B and C, aggregated by the station # and date: </p>
  
  <p>For example, station 1 on June 01 has 2 As, while station 2 on June 3 has 3 Bs. </p>
  
  <p>I tried, </p>
  
  <pre><code>aggregate(x = list(data_frame$classification), by = list(station=data_frame$station, Date=data_frame$date), function(x) length(unique(x))
  </code></pre>