igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Connected Components


From: Michael Knudsen
Subject: Re: [igraph] Connected Components
Date: Thu, 5 Nov 2009 16:18:49 +0100

On Thu, Nov 5, 2009 at 3:07 PM, Tamas Nepusz <address@hidden> wrote:

> 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:
>
> selected_vertices <- V(g)[which(g_clusters$membership == 2) - 1]

Thanks Tamas and Gábor! I can't believe that I actually got the point
about index shifts myself but forgot to apply it the second time :-)

-- 
Michael Knudsen
address@hidden
http://sites.google.com/site/micknudsen/




reply via email to

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