title: Calculate mean, max, min number of observations per group in R
body: <p>How to calculate mean, max, and min <strong>number of reviews</strong> per group in a dataframe in R? I have a dataset that looks like below:</p>
  <pre><code>Firm Review 
    A   Nice work
    B   Ok
    C   yes
    A   ok
    B   yes
    A   like 
  </code></pre>
  <p>In this case, firm A has 3 reviews, B has 2 and C has 1. Then Max=3, min=1, and average number of review per firm =6/3=2.
  The actual dataset has 2.1 million reviews across 50000 firms. What would be an effective way to group by a firm and then calculate these statistics?</p>