I would like to generate a small world network with a fixed degree of 10.
I have tried watts.strogatz.game(1, 100, 5, 0) which results in a degree of 10 but only 5 neighbours for each node.
I’m guessing this is because the network is undirected. is there any way to make it undirected?
The
igraphpackage contains many functions to create and manipulate graphs.In particular, the
get.edgelistfunction returns the list of edges, in the format you want.The
erdos.renyi.gamefunction, when you set the probability to 1, generates complete graphs.The
degree.sequence.gamefunction generates random graphs with a prescribed degree distribution.The
watts.strogatz.gamefunction generates small-world networks.