igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Exporting vertex labels by community


From: Gábor Csárdi
Subject: Re: [igraph] Exporting vertex labels by community
Date: Mon, 7 Jul 2014 16:19:45 -0400

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 <address@hidden> 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
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>



reply via email to

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