title: count number of rows in a data frame in R based on group
body: <p>I have a data frame in <code>R</code> like this:</p>
  
  <pre><code>  ID   MONTH-YEAR   VALUE
    110   JAN. 2012     1000
    111   JAN. 2012     2000
           .         .
           .         .
    121   FEB. 2012     3000
    131   FEB. 2012     4000
           .           .
           .           .
  </code></pre>
  
  <p>So, for each month of each year there are <code>n</code> rows and they can be in any order(mean they all are not in continuity and are at breaks). I want to calculate how many rows are there for each <code>MONTH-YEAR</code> i.e. how many rows are there for JAN. 2012, how many for FEB. 2012 and so on. Something like this:</p>
  
  <pre><code> MONTH-YEAR   NUMBER OF ROWS
   JAN. 2012     10
   FEB. 2012     13
   MAR. 2012     6
   APR. 2012     9
  </code></pre>
  
  <p>I tried to do this:</p>
  
  <pre><code>n_row &lt;- nrow(dat1_frame %.% group_by(MONTH-YEAR))
  </code></pre>
  
  <p>but it does not produce the desired output.How can I do that?</p>