|
From: | Tamas Nepusz |
Subject: | Re: [igraph] Connected Components |
Date: | Thu, 5 Nov 2009 14:07:45 +0000 |
This is another common catch with igraph in R: vertex IDs also start from zero, so you'll have to subtract 1 from the vertex IDs as well:Hence cluster number three is the biggest. Since counting starts at 0 in igraph, this means that the connected component consists of the vertices: selected_vertices <- V(g)[which(g_clusters$membership == 2)]
selected_vertices <- V(g)[which(g_clusters$membership == 2) - 1] -- Tamas
[Prev in Thread] | Current Thread | [Next in Thread] |