title: How to save matrices within a loop in R
body: <p>I have written the following script:</p>
  <pre><code>library(igraph)
  library(MASS)
  for(i in 1:1000){
  g01 &lt;- erdos.renyi.game(10, .50, directed = FALSE)
  E(g01)$weight &lt;- runif(length(E(g01)), 0, 12)
  plot(g01, edge.width=E(g01)$weight)
  p &lt;-as_adjacency_matrix(g01, attr=&quot;weight&quot;)
  s&lt;-print(p)}
  </code></pre>
  <p>Now, I wish to save the output generated (i.e. 1000 10X10 matrices)
  How should I go about it?</p>
  <p>Awaiting a reply &amp; thank you,
  Ishani Mukherjee</p>