> * Gábor Csárdi <[email protected]> [2012-03-20 22:28:17 -0400]:
>
> A workaround is to use clusters() to get the clusters and then create
> the subgraphs that you need manually.

> summary(sc.gr)
Vertices: 290583 
Edges: 262353 
Directed: TRUE 
No graph attributes.
Vertex attributes: name.
No edge attributes.

> sc.cl <- clusters(sc.gr, mode="weak")
> str(sc.cl)
List of 3
 $ membership: num [1:290583] 0 0 1 1 2 2 3 3 4 4 ...
 $ csize     : num [1:64342] 4 2 49830 18 883 ...
 $ no        : num 64342

as expected, since the csize[0] == 4, here are 4 vertices:
 
> which(sc.cl$membership == 0)
[1]      1      2  92259 280860

BUT:

> subgraph(sc.gr, which(sc.cl$membership == 0))
Vertices: 4 
Edges: 1 
Directed: TRUE 
Edges:
    e                                         
e [0] '4f33629f41393d3d' -> '4f33629f41393d3d'

this is not a weakly connected component!
there are 4 vertices and only 1 edge!

moreover, a direct examination of the original data shows that these 4
vertices are not isolated (they are connected to other vertices).

obviously, something is wrong.

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
http://www.childpsy.net/ http://dhimmi.com http://pmw.org.il
http://americancensorship.org http://www.memritv.org http://iris.org.il
The only guy who got all his work done by Friday was Robinson Crusoe.

_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to