title: R Code for removing values within a group
body: <p>I am working with data similar to the data below:</p>
  <pre><code>ID &lt;- seq(1,10,1)
  Letter &lt;- c(&quot;A&quot;, &quot;B&quot;, &quot;C&quot;,&quot;C&quot;, &quot;C&quot;, &quot;D&quot;, &quot;D&quot;, &quot;E&quot;,&quot;F&quot;, &quot;F&quot;)
  df&lt;- data.frame(ID, Letter)
  </code></pre>
  <pre><code>   ID Letter
  1   1      A
  2   2      B
  3   3      C
  4   4      C
  5   5      C
  6   6      D
  7   7      D
  8   8      E
  9   9      F
  10 10      F
  </code></pre>
  <p>Looking specifically at the <code>Letter</code> column, I want to subset the data such that the <code>Letter</code> column only includes the <code>ID</code> value 4. But I want to keep all other values as well. So the data looks like:</p>
  <pre><code>   ID Letter
  1   1      A
  2   2      B
  4   4      C
  6   6      D
  7   7      D
  8   8      E
  9   9      F
  10 10      F
  </code></pre>
  <p>Any help you can offer would be greatly appreciated!</p>