title: R finding rows of a data frame where certain columns match those of another
body: <p>I have an R question that I'm even sure how to word in one sentence, and couldn't find an answer for this yet.</p>
  
  <p>I have two data frames that I would like to 'intersect' and find all rows where column values match in <em>two</em> columns. I've tried connecting two intersect() and which() statements with &amp;&amp;, but neither has given me what I want yet.</p>
  
  <p>Here's what I mean. Let's say I have two data frames:</p>
  
  <pre><code>&gt; testData
                 Email     Manual Campaign Bounced Opened Clicked ClickThru Unsubscribed
  1 stack@overflow.com EIFLS0LS        1       0      0       0         0            0
  2 stack@exchange.com EIFLS0LS        1       0      0       0         0            0
  3     data@frame.com EIFLS0LS        1       0      0       0         0            0
  4    block@quote.com EIFLS0LS        1       0      0       0         0            0
  5          ht@ml.com EIFLS0LS        1       0      0       0         0            0
  6     tele@phone.com EIFLS0LS        1       0      0       0         0            0
  
  &gt; testBounced
                 Email Campaign
  1 stack@overflow.com        1
  2 stack@overflow.com        2
  3     data@frame.com        2
  4    block@quote.com        1
  5          ht@ml.com        1
  6        lap@top.com        1
  </code></pre>
  
  <p>As you can see, there are some values in the column Email that intersect, and some from the column Campaign that intersect. I want all of the rows from testData in which BOTH columns match. </p>
  
  <p>ie:</p>
  
  <pre><code>               Email     Manual Campaign Bounced Opened Clicked ClickThru Unsubscribed
  1 stack@overflow.com EIFLS0LS        1       0      0       0         0            0
  2    block@quote.com EIFLS0LS        1       0      0       0         0            0
  3          ht@ml.com EIFLS0LS        1       0      0       0         0            0
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>My goal in finding these columns is to be able to update a row in the original column. So the final output that I would like is:</p>
  
  <pre><code>&gt; testData
                 Email     Manual Campaign Bounced Opened Clicked ClickThru Unsubscribed
  1 stack@overflow.com EIFLS0LS        1       1      0       0         0            0
  2 stack@exchange.com EIFLS0LS        1       0      0       0         0            0
  3     data@frame.com EIFLS0LS        1       0      0       0         0            0
  4    block@quote.com EIFLS0LS        1       1      0       0         0            0
  5          ht@ml.com EIFLS0LS        1       1      0       0         0            0
  6     tele@phone.com EIFLS0LS        1       0      0       0         0            0
  </code></pre>
  
  <p>My apologies if this is a duplicate, and thanks in advance for your help!</p>
  
  <p>EDIT2::</p>
  
  <p>I ended up just using a for loop, nothing great, but doesn't feel efficient. The dataset was small enough to do it quickly, though. If anyone has a quick, R-style way to do it, I'd be happy to see it!</p>