title: Adjusting the node size in igraph using a matrix
body: <p>I have the following network diagram:</p>
  
  <pre><code>set.seed(1410)
  df&lt;-data.frame(
  "site.x"=c(rep("a",4),rep("b",4),rep("c",4),rep("d",4)),
  "site.y"=c(rep(c("e","f","g","h"),4)),
  "bond.strength"=sample(1:100,16, replace=TRUE))
  
  library(igraph)
  df&lt;-graph.data.frame(df)
  V(df)$names &lt;- c("a","b","c","d","e","f","g","h")
  layOUT&lt;-data.frame(x=c(rep(1,4),rep(2,4)),y=c(4:1,4:1))
  E(df)[ bond.strength &lt; 101 ]$color &lt;- "red"
  E(df)[ bond.strength &lt; 67 ]$color &lt;- "yellow"
  E(df)[ bond.strength &lt; 34 ]$color &lt;- "green"
  V(df)$color &lt;- "white"
  l&lt;-as.matrix(layOUT)
  plot(df,layout=l,vertex.size=10,vertex.label=V(df)$names,
  edge.arrow.size=0.01,vertex.label.color = "black")
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/nP2fq.png" alt="enter image description here"></p>
  
  <p>and would like to adjust the size of the nodes using a matrix such as this:</p>
  
  <pre><code>m&lt;-matrix(data=c(25,0,15,0,35,0,5,0,0,10,0,5,0,19,0,44), nrow=2, ncol=8)
  colnames(m)&lt;-c("a","b","c","d","e","f","g","h")
  row.names(m)&lt;-c("site.x","site.y")
  
          a  b  c d  e f  g  h
  site.x 25 15 35 5  0 0  0  0
  site.y  0  0  0 0 10 5 19 44
  </code></pre>
  
  <p>Any sugestions how I go about this?</p>