title: Creating a tree graph in igraph
body: <p>I am trying to create a genealogical tree in igraph (R), and I used the following code:</p>
  
  <pre><code>id = 1:5
  parent = c(1,1,2,3,3)
  name = c("A", "B", "C", "D", "E")
  data = data.frame(id, parent, name)
  n = graph.data.frame(data)
  co=layout.reingold.tilford(n, flip.y=T)
  plot &lt;- plot.igraph(g,layout=co, vertex.label = name)
  </code></pre>
  
  <p>D and E should both have parent C, but this code often plots D and E on top of each other with only one arrow (instead of two). Does anybody have the solution for this problem?</p>
  
  <p><a href="https://i.stack.imgur.com/cAI5m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cAI5m.png" alt="enter image description here"></a></p>