#Create a random graph with _some_ edge structure
g.p<-sapply(runif(20,0,1),rep,20) #Create a matrix of edge
#probabilities
g<-rgraph(20,tprob=g.p) #Draw from a Bernoulli graph
#distribution
#Cluster based on structural equivalence
eq<-equiv.clust(g)
plot(eq)
Run the code above in your browser using DataLab