simulate_network_growth() grows a network one node at a time. New nodes
attach either randomly or preferentially to already well-connected nodes.
Usage
simulate_network_growth(
n_nodes = 50,
m = 2,
mode = c("preferential", "random"),
seed = NULL
)Examples
net <- simulate_network_growth(n_nodes = 20, seed = 1)
head(net$edges)
#> from to step
#> 1 1 2 2
#> 2 3 2 3
#> 3 3 1 3
#> 4 4 3 4
#> 5 4 1 4
#> 6 5 1 5