title: how to drop a category level based on frequency using R
body: <p>I have the following data frame:</p>
  <pre><code>df&lt;-data.frame(store=c(&quot;A&quot;,&quot;A&quot;,&quot;A&quot;,&quot;A&quot;,&quot;B&quot;,&quot;C&quot;,&quot;C&quot;,&quot;C&quot;,&quot;C&quot;,&quot;C&quot;),
                 quantity=c(12,2,5,10,2,12,4,5,6,8))
  
  df
  
      store quantity
  1      A       12
  2      A        2
  3      A        5
  4      A       10
  5      B        2
  6      C       12
  7      C        4
  8      C        5
  9      C        6
  10     C        8
  </code></pre>
  <p>I want to drop the rows where store category is &lt;2 i.e. from the above table, i want to drop row no 5 as store B occurs only once?</p>