[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] How to know deleted edges by spinglass.community()
From: |
Gabor Csardi |
Subject: |
Re: [igraph] How to know deleted edges by spinglass.community() |
Date: |
Sat, 22 Dec 2007 00:03:41 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hi,
X-PGP-Key: http://www.rmki.kfki.hu/~csardi/pubkey.asc
On Fri, Dec 21, 2007 at 10:01:55AM +0900, MATSUDA, Noriyuki wrote:
> Hello:
>
> Is there a quick and efficient way to know which edges were deleted by
Not very elegant, but the simplest i can think of is
el <- get.edgelist(g, names=FALSE)
plot(g2, layout=layout.fruchterman.reingold, vertex.label=V(g)$name, cex=1.3)
> spinglass.community()?
> Besides the anal
> of communities to
> be compared with the original one.
> Use of delete.edges() seems faster than repeated use of
> graph.disjoint.union, particularly
> when I want to preserve vertex and edge attributes.
>
Thanks, same to you, G.
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> eA<- c(0,4,0,5,0,6,0,7,0,8,0,9,0,10)
> eB<- c(1,11,1,12,1,13,1,14,1,15,1,16,1,17)
> eC<- c(2,18,2,19,2,20,2,21,2,22,2,23,2,24)
> eD<- c(3,25,3,26,3,27,3,28,3,29,3,30,3,31,3,32)
> g<-graph(c(eA,eB,eC,eD),directed=F)
> z <- 0:3; V(g)[z]$name = paste(V(g)[z],LETTERS[z+1],sep="")
> z <- 4:10; V(g)[z]$name = paste(V(g)[z],"a",sep="")
> z <- 11:17; V(g)[z]$name = paste(V(g)[z],"b",sep="")
> z <- 18:24; V(g)[z]$name = paste(V(g)[z],"c",sep="")
> z <- 25:32; V(g)[z]$name = paste(V(g)[z],"d",sep="")
>
> V(g)$color="#efefef"; V(g)$size=16
> V(g)[0:3]$color="#aaaaFF"; V(g)[0:3]$size=20
> E(g)$color="black"
> g <- add.edges(g,c(0,1,2,7,15,25),color="red")
> V(g)[c(7,15,25)]$color="#aabb99"
>
> plot(g, layout= layout.fruchterman.reingold,vertex.label=V(g)$name, cex=1.3)
> title(main=list("fruchterman.reingold",col="red",font=4, cex=1.4))
>
> #spinglass.community
> spn <- spinglass.community(g, spins=4)
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> --
> MATSUDA, Noriyuki <in Kanji> 松 田 紀 之
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
--
Csardi Gabor <address@hidden> MTA RMKI, ELTE TTK