|
From: | Lin Freeman |
Subject: | Re: [igraph] dendrogram |
Date: | Wed, 24 Nov 2010 09:26:00 -0800 |
g <- graph.full(5) %du% graph.full(5) %du% graph.full(5)
g <- add.edges(g, c(0,5, 0,10, 5, 10))
wtc <- walktrap.community(g)
memb <- community.to.membership(g, wtc$merges, steps=12)
modularity(g, memb$membership)
But suppose I have a file containing the membership vector. How do I use that instead
of the membership vector that was produced by the walktrap.community operation?
Prof Freeman,
there is no 'as.dendrogram' method defined for fastgreedy.community
results currently, but since the results are in the same form as for
walktrap.community, you can simply do
dend <- igraph:::as.dendrogram.igraph.walktrap(fc)
as a workaround.
Best Regards,
Gabor
> _______________________________________________
On Tue, Nov 16, 2010 at 7:26 PM, Lin Freeman <address@hidden> wrote:
> Hi,
>
> What am I doing wrong here?
>
>> fc <- fastgreedy.community(G, modularity=TRUE)
>> dend <- as.dendrogram(fc, use.modularity=TRUE)
> Error in UseMethod("as.dendrogram") :
> no applicable method for 'as.dendrogram' applied to an object of class
> "list"
>>
>
>
> --
> Linton C. Freeman
> Institute for Mathematical Behavioral Sciences and
> Department of Sociology
> School of Social Sciences SSPA 2143
> University of California
> Irvine, CA 92697-5100
>
> Office: (949) 824-6698
> Home (CA): (949) 494-6139
> (FL): (941) 778-1074
> Secretary: (949) 824-3663
> FAX: (949) 824-3733
>
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
--
Gabor Csardi <address@hidden> UNIL DGM
_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help
[Prev in Thread] | Current Thread | [Next in Thread] |