Re: [R] Watts Strogatz game

From: Robert Baer <>
Date: Wed, 04 May 2011 08:28:50 -0500

>> I have a erdos-renyi game with 6000 nodes and probability 0.003.
>> g1 =, 0.003)
>> How to create a Watts Strogatz game with the same probability.
>> g1 =, 6000, ?, ?)
>> What should be the third and fourth parameter to this argument.

According to ? help file (in the igraph package?), the four arguments to this function are:

dim     Integer constant, the dimension of the starting lattice.
size     Integer constant, the size of the lattice along each dimension.
nei     Integer constant, the neighborhood within which the vertices of the 
lattice will be connected.
p         Real constant between zero and one, the rewiring probability.

So it looks like the last two should be neighborhood and rewiring probability respectively. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 05 May 2011 - 06:25:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 05 May 2011 - 07:00:07 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive