Dear Alexander,

On Wed, Sep 5, 2012 at 12:20 PM, Alexander Struck
<[email protected]> 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:[email protected]
>
> tel: +49 30 2093-4294
>
>
>
>
> _______________________________________________
> igraph-help mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/igraph-help



-- 
Gabor Csardi <[email protected]>     MTA KFKI RMKI

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

Reply via email to