title: R - Directed graph, Keep only when directed both ways
body: <p>I have a dataset of people that "like" each other. 
  I converted it to a graph.</p>
  
  <pre><code>g.likes &lt;- graph_from_data_frame(dt.likes, directed = TRUE)
  </code></pre>
  
  <p>But I need to filter out the people that have liked each other. so only keep if A->B and B->A. </p>
  
  <p>I don't seem to be able to find how I can do this. </p>
  
  <p>Thank you in advance</p>
  
  <pre><code>IGRAPH 80b2ed9 DN-- 15060 2577550 -- 
  + attr: name (v/c), week (e/n)
  + edges from 80b2ed9 (vertex names):
  [1] 4  -&gt;75  217-&gt;68  217-&gt;72  217-&gt;127 221-&gt;68  221-&gt;72  221-&gt;127 217-&gt;9   258-&gt;89  258-&gt;4   217-&gt;69  258-&gt;293 309-&gt;193
  [14] 309-&gt;268 323-&gt;396 274-&gt;396 274-&gt;193 381-&gt;36  381-&gt;396 381-&gt;4   381-&gt;17  381-&gt;101 381-&gt;193 515-&gt;490 262-&gt;396 480-&gt;527
  [27] 451-&gt;421 451-&gt;484 451-&gt;301 262-&gt;407 262-&gt;480 262-&gt;96  262-&gt;217 262-&gt;490 262-&gt;314 262-&gt;28  262-&gt;473 262-&gt;193 262-&gt;281
  [40] 262-&gt;642 262-&gt;172 262-&gt;409 262-&gt;582 262-&gt;289 262-&gt;558 262-&gt;303 262-&gt;280 262-&gt;627 262-&gt;635 262-&gt;138 262-&gt;364 262-&gt;565
  [53] 262-&gt;550 262-&gt;543 262-&gt;535 262-&gt;609 262-&gt;411 262-&gt;574 262-&gt;566 262-&gt;102 262-&gt;618 262-&gt;581 262-&gt;408 262-&gt;419 262-&gt;584
  [66] 262-&gt;89  262-&gt;467 262-&gt;594 262-&gt;580 262-&gt;226 262-&gt;575 262-&gt;472 262-&gt;569 262-&gt;557 262-&gt;532 262-&gt;525 262-&gt;445 262-&gt;382
  [79] 262-&gt;540 262-&gt;511 262-&gt;529 262-&gt;66  262-&gt;486 262-&gt;510 262-&gt;516 262-&gt;48  262-&gt;503 262-&gt;504 262-&gt;454 262-&gt;488 262-&gt;506
  [92] 262-&gt;495 262-&gt;416 262-&gt;497 262-&gt;494 262-&gt;499 262-&gt;496 262-&gt;492 262-&gt;493 262-&gt;484 262-&gt;392 262-&gt;336 262-&gt;485 262-&gt;204
  </code></pre>