title: Purging data frame of unwanted rows based on two vector sets
body: <p>Looking for a way of purging rows from a data frame whose values do not match two sets of vectors, one set applies to column1, and the second to column2. I want this to be an either or both (i.e. if row x has a col1 match but not col2, row x is not purged). This is what I was going for but the code doesn't work:</p>
  
  <pre><code>purged_frame &lt;- original_frame[(original_frame$Column1 %in% vectorsetforcol1 | original_frame$Column2 %in% vectorsetforcol2),]
  </code></pre>
  
  <p>Thanks!</p>
  
  <p>Edit: need an either or both scenario - wasn't very clear in my original question - anybody?</p>