igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Potential problem with edge.betweenness.community


From: Bob Pap
Subject: [igraph] Potential problem with edge.betweenness.community
Date: Tue, 23 Oct 2012 14:10:53 +0200

Dear all,

I am running R 2.15.1 and the recently released igraph 0.6-3.

I have a network G created with the following number of edges and vertices:

> ecount(G)

[1] 13658

> vcount(G)

[1] 1815

Following the instructions in http://igraph.wikidot.com/community-detection-in-r, I create an edge-betweeness community:

ebc <- edge.betweenness.community(G, weight = E(G)$vbh)

Even though nothing is indicated, the first sign of problems (the last NA line):

> str(ebc)

List of 835

 $ removed.edges   : num [1:13658] 11771 11755 11765 11770 11766 ...

 $ edge.betweenness: num [1:13658] 136931 126427 80485 139251 147060 ...

 $ merges          : num [1:1814, 1:2] 915 59 144 1818 1474 ...

 $ bridges         : num [1:1814] 13658 13657 13656 13655 13653 ...

 $ modularity      : num [1:1815] -0.0112 -0.0111 -0.011 -0.011 -0.0108 ...

 $ membership      : num [1:1815] 1 1 1 2 1 1 1 1 1 1 ...

 $ names           : chr [1:1815] "AT18400" "AT19190" "AT19520" "AT20100" ...

 $ vcount          : int 1815

 $ algorithm       : chr "edge betweenness"

 $ NA:Error in object[[i]] : subscript out of bounds

and then more problems (edges or vertices evoked do not exist):

> mods <- sapply(0:ecount(G), function(i) {

+ g2 <- delete.edges(G, ebc$removed.edges[seq(length=i)])

+ cl <- clusters(g2)$membership

+ modularity(G, cl)

+ })

Error in delete.edges(G, ebc$removed.edges[seq(length = i)]) : 

  At iterators.c:1809 : Cannot create iterator, invalid edge id, Invalid vertex id

Is there a bug in edge.betweenness.community?  Any help would be greatly appreciated.

Kind regards,

Bob


reply via email to

[Prev in Thread] Current Thread [Next in Thread]