title: filter data.frame in R according to variable values and an external list
body: <p>I have a data.frame with 5 variable and 2k rows. I need to filter this data.frame in R keeping all the rows in which BOTH var2 and var1 are in a specific list (fle: <code>list.txt</code>). If both var 1 and var 2 or one of the two are not in the list, the row should be deleted.</p>
  <p>Example:</p>
  <pre><code>&gt; df(head)
               Var2       Var1    GS    Info_region.x    Info_region.y
      27475 1wd2_A_001 2ct7_A_002 0.675 RNF31_region_010 ARIH1_region_008
      27521 1wd2_A_001 2ct7_A_001 0.713 RNF31_region_005 ARIH1_region_008
      37576 2crc_A_001 1wd2_A_001 0.709 ARIH1_region_008 RBCK1_region_002
      37688 2crc_A_001 2ct7_A_002 0.793 RNF31_region_010 RBCK1_region_002
      37701 2crc_A_001 2ct7_A_001 0.834 RNF31_region_005 RBCK1_region_002
      42636 2ct7_A_002 2ct7_A_001 0.826 RNF31_region_005 RNF31_region_010
  
  
  list.txt:
  1wd2_A_001
  2ct7_A_001
  2crc_A_001
  
  
  output:
       Var2       Var1    GS    Info_region.x    Info_region.y
      27521 1wd2_A_001 2ct7_A_001 0.713 RNF31_region_005 ARIH1_region_008
      37576 2crc_A_001 1wd2_A_001 0.709 ARIH1_region_008 RBCK1_region_002
      37701 2crc_A_001 2ct7_A_001 0.834 RNF31_region_005 RBCK1_region_002
  </code></pre>
  <p>Could someone suggest a script in R to do this please? Thank you!</p>