title: Find the reverse direction edge and subtract its weight from its oposite
body: <p>I'm having a matrix like the following one</p>
  
  <pre><code>m &lt;- expand.grid(LETTERS[1:24],LETTERS[1:24])
  m$weight &lt;- runif(nrow(m), 0.01, max = 1)
  m &lt;- m[m$Var1!=m$Var2, ] ##remove loop edges
  colnames(m) = c("to","from","weight")
  </code></pre>
  
  <p>and in this form it describes a directed graph. What I want to do is to subtract and take the absolute value of each pair of inverse edges and create a new matrix describing a new undirected graph. i.e:</p>
  
  <pre><code>abs( edge_weight(A,B) - edge_weight(B,A) )
  </code></pre>
  
  <p>But I don't know how to take into account only once each pair.</p>