title: Selection of rows from 2 dataframes based on multiple conditions
body: <p>I have 2 data.frames</p>
  
  <pre><code>&gt; abc
      V1     V2     V3          V4  V5 V6       V7       V8            V9    V10    V11       V12          V13
  1 chr1 812640 813470 Rank_108039   5  .  2.51728  2.10797  0.59423|chr1 803450 812182 NR_027055       FAM41C
  2 chr1 842313 842638 Rank_154173   3  .  2.34097  1.79807  0.35120|chr1 852197 855072 NR_026874 LOC100130417
  3 chr1 843404 843769 Rank_154173   3  .  2.34097  1.79807  0.35120|chr1 852197 855072 NR_026874 LOC100130417
  4 chr1 849172 849318 Rank_180753   2  .  2.19849  1.65655  0.25215|chr1 852197 855072 NR_026874 LOC100130417
  5 chr1 761091 763246  Rank_11761 227  . 10.29544 24.83220 22.77738|chr1 763177 794826 NR_047525    LINC01128
  
  &gt; cde
      V1     V2     V3         V4  V5 V6       V7       V8            V9    V10    V11       V12          V13
  1 chr1  28565  28699 Rank_31267   1  .  2.17937  1.99334  0.18208|chr1  14361  29370 NR_024540       WASH7P
  2 chr1 712911 714068 Rank_12239 208  .  8.78112 22.93857 20.88265|chr1 700244 714068 NR_033908 LOC100288069
  3 chr1 761091 762902 Rank_11761 227  . 10.29544 24.83220 22.77738|chr1 761585 762902 NR_024321    LINC00115
  4 chr1 761091 763246 Rank_11761 227  . 10.29544 24.83220 22.77738|chr1 763177 794826 NR_047525    LINC01128
  </code></pre>
  
  <p>I want to make a new dataframe which contains all those rows for which <code>abc$V12 == cde$V12</code> AND <code>abc$V13 == cde$V13</code>
  I have tried many possible option (subset, dplyr's filter, sqldf's SELECT) but I am unable to do it.</p>
  
  <p>According to these conditions, my final data.frame will only be having the row5 of abc as it fulfills the required condition. So the output will be:</p>
  
  <pre><code>&gt; final.df
  5 chr1 761091 763246  Rank_11761 227  . 10.29544 24.83220 22.77738|chr1 763177 794826 NR_047525    LINC01128
  </code></pre>
  
  <p>Here are the dput of the data.frames:</p>
  
  <pre><code>&gt; dput(abc)
  structure(list(V1 = structure(c(1L, 1L, 1L, 1L, 1L), .Label = "chr1", class = "factor"), 
      V2 = c(812640L, 842313L, 843404L, 849172L, 761091L), V3 = c(813470L, 
      842638L, 843769L, 849318L, 763246L), V4 = structure(c(1L, 
      3L, 3L, 4L, 2L), .Label = c("Rank_108039", "Rank_11761", 
      "Rank_154173", "Rank_180753"), class = "factor"), V5 = c(5L, 
      3L, 3L, 2L, 227L), V6 = structure(c(1L, 1L, 1L, 1L, 1L), .Label = ".", class = "factor"), 
      V7 = c(2.51728, 2.34097, 2.34097, 2.19849, 10.29544), V8 = c(2.10797, 
      1.79807, 1.79807, 1.65655, 24.8322), V9 = structure(c(3L, 
      2L, 2L, 1L, 4L), .Label = c("0.25215|chr1", "0.35120|chr1", 
      "0.59423|chr1", "22.77738|chr1"), class = "factor"), V10 = c(803450L, 
      852197L, 852197L, 852197L, 763177L), V11 = c(812182L, 855072L, 
      855072L, 855072L, 794826L), V12 = structure(c(2L, 1L, 1L, 
      1L, 3L), .Label = c("NR_026874", "NR_027055", "NR_047525"
      ), class = "factor"), V13 = structure(c(1L, 3L, 3L, 3L, 2L
      ), .Label = c("FAM41C", "LINC01128", "LOC100130417"), class = "factor")), .Names = c("V1", 
  "V2", "V3", "V4", "V5", "V6", "V7", "V8", "V9", "V10", "V11", 
  "V12", "V13"), class = "data.frame", row.names = c(NA, -5L))
  &gt; dput(cde)
  structure(list(V1 = structure(c(1L, 1L, 1L, 1L), .Label = "chr1", class = "factor"), 
      V2 = c(28565L, 712911L, 761091L, 761091L), V3 = c(28699L, 
      714068L, 762902L, 763246L), V4 = structure(c(3L, 2L, 1L, 
      1L), .Label = c("Rank_11761", "Rank_12239", "Rank_31267"), class = "factor"), 
      V5 = c(1L, 208L, 227L, 227L), V6 = structure(c(1L, 1L, 1L, 
      1L), .Label = ".", class = "factor"), V7 = c(2.17937, 8.78112, 
      10.29544, 10.29544), V8 = c(1.99334, 22.93857, 24.8322, 24.8322
      ), V9 = structure(c(1L, 2L, 3L, 3L), .Label = c("0.18208|chr1", 
      "20.88265|chr1", "22.77738|chr1"), class = "factor"), V10 = c(14361L, 
      700244L, 761585L, 763177L), V11 = c(29370L, 714068L, 762902L, 
      794826L), V12 = structure(c(2L, 3L, 1L, 4L), .Label = c("NR_024321", 
      "NR_024540", "NR_033908", "NR_047525"), class = "factor"), 
      V13 = structure(c(4L, 3L, 1L, 2L), .Label = c("LINC00115", 
      "LINC01128", "LOC100288069", "WASH7P"), class = "factor")), .Names = c("V1", 
  "V2", "V3", "V4", "V5", "V6", "V7", "V8", "V9", "V10", "V11", 
  "V12", "V13"), class = "data.frame", row.names = c(NA, -4L))
  </code></pre>