title: How to find the shortest Path in R
body: <p>Problem:
  I have a data frame with a set of points with Lat and Long information. We need to start from A and traverse through each of the other nodes once and end at any point. The objective is to minimise the total haversine distance travelled. </p>
  
  <pre><code>df &lt;- data.frame("name" = c("A", "B", "C", "D", "E"), 
  "lon" = c(-73.001, 23.231, 1.23, 115.40, -87.98), 
  "lat" = c(40.21, 32.78, -34.30, 21.92, -12.2))
  </code></pre>
  
  <p>Generating all permutation will not work if the number of points is large. I have tried to use iGraph package but couldnt understand how to solve this problem. With distm (gepsphere), I can get all distance matrix but I dont know how to proceed. </p>
  
  <p>Please help me in figuring out how to do this. I am looking for a Solution in R.</p>