I am using igraph in R to generate networks. I used erdos.renyi.game(100, 2/100) to generate a random graph.
Now, I need neighbourhood info from this graph as output (*.nei or *.txt) which should look like as follows:-
Node No of neighbours List of neighbours
1 2 21 27
2 5 11 20 23 9 8
- - --
- - --
- - --
- - --
100 4 89 78 77 34
I am newbie. Please be kind and help.
regards
Amit