Hi, On Thu, Apr 12, 2012 at 8:46 AM, R N <[email protected]> wrote: > Hi, > > are the examples of community detection presented in > http://igraph.wikidot.com/community-detection-in-r > meant for unweighted graphs?
yes, it seems so. > How can they be modified to use edge > weights? Is it sufficient to add the > appropriate parameter, e.g.: label.propagation.community() does have an argument 'weights'. Please see the manual: http://igraph.sourceforge.net/doc/R/label.propagation.community.html > ### label.propagation.community > memberships$`Label propagation` <- label.propagation.community(G, E(G)$weight) > ### and calculate modularity > Q <- modularity (G, memberships$`Label propagation`, E(G)$weight) modularity() also supports weights: http://igraph.sourceforge.net/doc/R/modularity.html [...] -- Gabor Csardi <[email protected]> MTA KFKI RMKI _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
