[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] calculating modularity
From: |
Khanh Nguyen |
Subject: |
[igraph] calculating modularity |
Date: |
Wed, 8 Dec 2010 13:39:14 -0500 |
Hi all,
I create a graph as follow
src <- c('a','b','c','e','f')
dst <- c('b','c','d','f','g')
ee <- cbind(src,dst)
g1 <- graph.edgelist(as.matrix(ee), directed=FALSE)
and two vector describing the community structure of the graph
c1 <- c("1", "a", "b" , "c" , "d")
c2 <- c("2", "e","f","g")
I'd like to use modularity() to compute the modularity but I am
struggling to generate the "membership" parameter correctly. How can I
map the community assignment in this form to the node's id? Thanks.
Regards,
-k
- [igraph] calculating modularity,
Khanh Nguyen <=