邻接矩阵的图
library(igraph)
cells<-c(0,0,1,0,1,1,0,1,0,0,0,0,0,0,0,0,1,0,1,1,0,1,0,0,0,0,0,0,1,1,0,3,0,3,3,3,0,0,0,0,0,0,0,0,3,0,3,1,1,1,0,0,0,0,0,0,1,1...0,3,0,0,0,0,1,0,0,0,0,0,1,1,3,1,0,0,3,0,0,0,0,0,0,0,0,0,3,1,0,3,0,0,3,1,0,3,0,0,1,1,3,1,0,0,0,0,0,3,0,3,1,1,0,0,0,0,1,3,3,0,0,3,1,3,0,0,0,0,0,0,0,0,1,3,3,0,0,3,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,0,0,1,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,1,0)
cells=matrix(cells,14,14,byrow=T) #创建邻接矩阵...Alice-Bob-Cecil-Alice,Daniel-Cecil-Engene,Cecil-Gordon)
> plot(g)
(3)
graph.data.frame() #从数据框画图
graph.adjacency() #从邻接矩阵创建图