title: Individual events into frequency per year
body: <p>I am pretty new to R and still trying to learn. I am looking to take a list of individual events, with information on the year of the event and the location of the event, and turn it into a dataset that counts the number of times an event occurs in one location each year. Here is an example of my current data set:</p>
  
  <pre><code>Event|Year |Location
  -----|-----|--------
      1| 2001| A
      2| 2003| B
      3| 2001| B
      4| 2003| A
      5| 2002| C
      6| 2001| B
      7| 2002| A
      8| 2003| C
      9| 2002| A
     10| 2002| A
  </code></pre>
  
  <p>The data set I am looking for so I can run regressions on it is:</p>
  
  <pre><code>Year|Location| Number of Occurrences 
  ----|--------|----------------------
  2001|       A| 1
  2002|       A| 3
  2003|       A| 1
  2001|       B| 2
  2002|       B| 0
  2003|       B| 1
  2001|       C| 0
  2002|       C| 1
  2003|       C| 1
  </code></pre>