# code to produce the blockmodel figure in the supplementary paper library(sna) localinfo<-read.csv("Caltech_localinfo.csv") # read in the adjacency matrix Y<-as.matrix(read.table("CaltechY.dat")) # replace the diagonals with 1s diag(Y)<-1 net<-network(Y,directed=FALSE) eq<-equiv.clust(net) b<-blockmodel(net,eq,h=13) image(b$blocked.data,col=c(0,1))