title: filter for rows that meet multiple conditions in a column
body: <p>I am trying to subset or filter for rows where an ID is associated with two values in the same column (there is a row for each "ID" and the associated condition "DIR")</p>
  
  <p>I was not able to figure this out in dplyr filter or with the subset function</p>
  
  <pre><code>x &lt;- data.frame("ID"=c(1,2,2,3,3,3,4,4,4,4),
                "DIR"=c("up","up","down","up","up","up","down","down","down","down"))
  
  </code></pre>
  
  <p>I have attempted variations on both:</p>
  
  <pre><code>subset(x, DIR=="up" &amp; DIR=="down") 
  
  x %&gt;% group_by(ID) %&gt;% filter(DIR=="up" &amp; DIR=="down")
  </code></pre>
  
  <p>What I would like is for all that remains to be the two rows for ID #2, given that it is the only ID that has both "up" and "down" in the DIR column</p>
  
  <p>It is returning no results</p>