title: how to get adjacency matrix where values are the difference of nodes' attributes
body: <p>I have a network like this:</p>
  
  <pre><code>g1 &lt;- erdos.renyi.game(10, 0.5)
  V(g1)$time &lt;- seq(1:10)
  </code></pre>
  
  <p>I know that igraph has a get.adjacency() to retrieve an adjacency matrix from a graph, where values in the matrix are either 0 (no link) or 1 (a link is present), or this value can be one out of every edge attributes available... I have to retrieve an adjacency matrix, but instead of the traditional 0/1 value or the edge attribute, I need to have the difference of $time between the sender and the receiver of each dyad:</p>
  
  <pre><code>adj &lt;- get.adjacency(g1)
  dims &lt;- dim(adj)
  for(i in 1:dims[1]){
      for(ii in 1:dims[2]){
      adj[i,ii] &lt;- (V(g1)[V(g1)==i]$time - V(g1)[V(g1)==ii]$time)
      }
  }
  </code></pre>
  
  <p>Is there a better way to accomplish this task?</p>