[R] Social Networks - how to get the same network layout every time when I plot the network?

2009-01-06 Thread Despina Stefan
Hi, I am using the function plot.network from the network library. However, I noticed that every time when I use the function I get a different layout (the network is rotated?). I would like to get the exact same picture every time when I use the function. Is that possible (maybe set a seed or

Re: [R] Social Networks - how to get the same network layout every time when I plot the network?

2009-01-06 Thread jim holtman
If you want the same network each time, then set the random seed to the same value: n-6 dat - rbinom(n*(n-1)/2,1,.6) net-diag(n) net[lower.tri(net)] - dat net[upper.tri(net)] - t( net )[upper.tri(net)] net #the network library(network) g-network(net,directed=FALSE) set.seed(1) plot.network(g)