Erdős-Rényi random graph G(N, M).
Arguments
- N
number of nodes/agents
- M
number of edges to be randomly assigned
Value
igraph Graph instance
Examples
# Create a 10-node network with 10 randomly-assigned edges
library(igraph)
#>
#> Attaching package: ‘igraph’
#> The following objects are masked from ‘package:stats’:
#>
#> decompose, spectrum
#> The following object is masked from ‘package:base’:
#>
#> union
net <- G_NM(10, 10)
plot(net)