[Top][All Lists]

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

Re: [igraph] Choosing between different methods of detecting communities

From: Roey Angel
Subject: Re: [igraph] Choosing between different methods of detecting communities
Date: Tue, 09 Oct 2012 20:29:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120912 Thunderbird/15.0.1

Thanks Gabor,
Using community() gave the right input for Tamas' function (haven't tried your solution, Tamas).

Thank you both for the help

On 10/09/2012 04:02 PM, Gábor Csárdi wrote:
On Tue, Oct 9, 2012 at 6:51 AM, Roey Angel <address@hidden> wrote:
Hi Tamas,
Thanks again. This is exactly my prob. I know about membership() but that
produces an an numeric not a list. Even coercing it with as.list() doesn't
do the trick and the function doesn't work.
The problem is to convert membership to a list of communities containing
each it's respective nodes, but I can't figure out how to do that. I'm just
not familiar enough with these objects to even understand where exactly the
node names are stored.
You don't need to be familiar with the internal representation(s) of
these object. In fact, quite the contrary, you should not use the
internals, because they might change. Just use the API. E.g. to get
the list you want, just use the communities() function. See more at
?communities. E.g.

g <- graph.ring(10)
fc <- fastgreedy.community(g)
#  [1] 2 2 2 2 1 1 1 1 3 3
# $`1`
# [1] 5 6 7 8
# $`2`
# [1] 1 2 3 4
# $`3`
# [1]  9 10



igraph-help mailing list

Attachment: angel.vcf
Description: Vcard

reply via email to

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