igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] community detection - match node IDs to character IDs


From: Gábor Csárdi
Subject: Re: [igraph] community detection - match node IDs to character IDs
Date: Wed, 5 Sep 2012 12:31:44 -0400

Dear Alexander,

On Wed, Sep 5, 2012 at 12:20 PM, Alexander Struck
<address@hidden> wrote:
> Dear all,
>
> I'm using igraph v0.6 on R 2.15.1 and create my graph objects from edgelists 
> made of character IDs.
> After community detection:
> When I call membership(myCommObj) I receive a named vector with 
> name=characterID and value=communityID.
> Calling communities(myCommObj) prints a list of communityIDs and each entry 
> is a vector of nodeIDs.
> I need to match the nodeIDs to characterIDs and my best guess is the order of 
> the membership vector, i.e. the index would be the nodeID. Please confirm 
> and/or point me to documentation I may have missed.

from ?communities:

     ‘membership’ gives the division of the vertices, into communities.
     It returns a numeric vector, one value for each vertex, the id of
     its community. Community ids start from one.

You are right that it does not explicitly say that the order is
according to vertex ids, but is pretty much the default for all igraph
functions returning quantities for all vertices (e.g. degree,
betweenness, etc.). I'll make this clear in the documentation,
nevertheless.

Best,
Gabor

> Many thanks,
> Alexander
>
> --
>
> Alexander Struck, M.A.
> Institut fuer Bibliotheks- und Informationswissenschaft
> Humboldt-Universitaet zu Berlin
> Dorotheenstr 26
> 10117 Berlin
>
>
> mailto:address@hidden
>
> tel: +49 30 2093-4294
>
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help



-- 
Gabor Csardi <address@hidden>     MTA KFKI RMKI



reply via email to

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