title: How to assign edge weights to certain edges in R igraph
body: <p>I'd like to assign a small, non-negative edge weights to certain edges used in a shortest path. Here is an example graph:</p>
  
  <pre><code>library(igraph)
  data &lt;- read.table(text="
  1 2
  1 4
  1 5
  2 3
  2 4
  3 4
  5 7
  5 8
  3 6", header=FALSE)
  gmatrix &lt;- data.matrix(data, rownames.force = NA) #convert into a matrix to use in igraph
  g &lt;- graph_from_edgelist(gmatrix, directed = FALSE) 
  </code></pre>
  
  <p>If I find the shortest path between node 1 and node 3, the edges used are 1-2 and 1-3.</p>
  
  <pre><code>get.shortest.paths(g, 1,3)
  $vpath
  $vpath[[1]]
  + 3/9 vertices, from 634c426:
  [1] 1 2 3
  </code></pre>
  
  <p>What I want to do is to assign a small epsilon value to those edges. Then, I'd like to call <code>get.shortest.paths(g, 1,3)</code> to test whether the function will identify the same path or not.</p>