Hi, if your graph is 'g', and your numeric vertex ids are 'ids', then 'V(g)$name[ids]' or even 'V(g)[ids]$name' gives you the symbolic names.
Gabor On Mon, Jul 7, 2014 at 3:44 PM, Brooke Foucault Welles <[email protected]> wrote: > Hi all, > > I'm working with network data drawn from Twitter (~8K nodes). In the > original (graphml) file, the vertices are labeled as strings that are > Twitter names (e.g. @foucaultwelles). I have successfully read the graphml > file into igraph, and used infomap.community to detect 450 communities > within the largest connected component of the graph. > > I would like to print (or export) a list of Twitter names by community. So > far, the closest I've come is the membership() command, which returns the > community assignment for each vertex, represented numerically. > > Is there a way to export the vertex labels (in this case, Twitter names) by > community directly? Something like, "Community 1: @foucaultwelles, > @johnsmith, @maryjones, ..." would be ideal. > > I am more comfortable working in the R version of igraph, but could work in > Python if needed. > > Thanks in advance for your suggestions! > > best, > Brooke > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help > _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
