title: For-Loop: getting object names into plot titles and file names
body: <p>I have about two dozen networks that I want to plot using the same layout (they all share the same vertices). I'm new to R and igraph, so I have come up with this solution, which probably isn't very elegant. Now I'm stuck though. I'd like to know how I can get object names (in this case: V_turn1 etc.) into my plot titles and, if possible, into the file names.</p>
  
  <p>I have added some random networks to make it easier to make it reproducible. It goes a little something like this:</p>
  
  <pre><code>print("begin")
  library("igraph")
  
  V_turn1 &lt;- erdos.renyi.game(n=10,p.or.m=.2,type="gnp",directed=T)
  V_turn2 &lt;- erdos.renyi.game(n=10,p.or.m=.1,type="gnp",directed=T)
  V_turn3 &lt;- erdos.renyi.game(n=10,p.or.m=.3,type="gnp",directed=T)
  V_turn4 &lt;- erdos.renyi.game(n=10,p.or.m=.3,type="gnp",directed=T)
  
  layout.old &lt;- layout.random(V_turn1) 
  # I need the same layout for all renderings, because the nodes are all the same across my network data 
  list_of_graphs &lt;- c("V_turn1", "V_turn2", "V_turn3", "V_turn4")
  
  png(file="Networks_V3_%03d.png", width=1000,height=1000)
  
  for(i in list_of_graphs){
  
          plot(get(i), layout=layout.old)  
          title(deparse(list_of_graphs))
          } 
          dev.off()
  </code></pre>
  
  <p>"deparse(list_of_graphs)" obviously doesn't work...</p>
  
  <p>Actually, I'd be even happier if I could specify real titles for each iteration of the loop, i.e. in a new character vector or something (like "This is Turn 1" for V_turn1). I feel like there must be an obvious solution, but I so far nothing I've tried worked. Thank you for reading. </p>