I am new to R
.
I am trying to create a loop where I create multiple networks at the same time. Something like:
#loading required packages
library(igraph)
library(tidygraph)
for (i in 1:10) {
G[i]=play_erdos_renyi(10, .2)
}
Where i-th element
of G
will store the graph generated from the i-th draw
. Any idea what kind of of object I need G
to be defined as?