title: group by and filter data management using dplyr
body: <p>Take a simple dataset</p>
  
  <pre><code>a &lt;- c(1,2,3,4,5,6,7,8)
  b &lt;- c(1,2,2,1,2,2,2,2)
  c &lt;- c(1,1,1,2,2,2,3,3)
  d &lt;- data.frame(a,b,c)
  </code></pre>
  
  <p>now I want to filter my data, so that we <code>group_by(c)</code> and then remove all data where no <code>b=1</code>occurs.</p>
  
  <p>Thus the results (<code>e</code>) should look like <code>d</code> but without the two bottom rows</p>
  
  <p>I have tried using</p>
  
  <pre><code>e &lt;- d %&gt;%
    group_by(c) %&gt;%
    filter(n(b)&gt;1)
  </code></pre>
  
  <p>The output should contain the data in green below and remove the data in red</p>
  
  <p><img src="https://i.stack.imgur.com/qIao7.png" alt="enter image description here"></p>