 <p>This solution should work just fine. Use <code>ave</code> to get the count of values for each <code>group</code></p> <pre><code>df[ ave(df$score,df$group, FUN=length) &gt;=3 ,] # group score # 1 1 30 # 2 1 10 # 3 1 22 # 8 4 35 # 9 4 2 # 10 4 60 </code></pre>