title: igraph's Shortest Path find wrong on R
body: <pre><code>1 2
  1 3
  1 4
  1 5
  2 3
  2 4
  2 5
  5 6
  </code></pre>
  
  <p>This is my graph information text file.</p>
  
  <pre><code>library("igraph")
  g&lt;-read.table("/home/emir/RRR/graph.txt",)
  g&lt;- graph.data.frame(g,directed=0)
  get.shortest.paths(g, 6,4,  weights = NULL ,output=c("vpath", "epath", "both"))
  plot(g)
  </code></pre>
  
  <p><a href="http://imgur.com/vLSTkcK" rel="nofollow">http://imgur.com/vLSTkcK</a></p>
  
  <p>When i plot the graph it all correct. But When i tried to find shortest path, its not always giving me the right path. Output is =6 3 1 4. It should be 6 5 2 4. As you can see there is no edge between 6 and 3. How can i overcome this issue. </p>