Computes a vector of communities (community) and a global modularity measure (Q)
louvain(A, gamma, M0)
An adjacency matrix of network data
Defaults to 1
.
Set to gamma
> 1 to detect smaller modules and gamma
< 1 for larger modules
Input can be an initial community vector.
Defaults to NULL
Returns a list containing:
A community vector corresponding to each node's community
Modularity statistic. A measure of how well the communities are compartmentalized
Blondel, V. D., Guillaume, J. L., Lambiotte, R., & Lefebvre, E. (2008). Fast unfolding of communities in large networks. Journal of Statistical Mechanics: Theory and Experiment, 2008, P10008.
Rubinov, M., & Sporns, O. (2010). Complex network measures of brain connectivity: Uses and interpretations. NeuroImage, 52, 1059-1069.
# NOT RUN {
# Pearson's correlation only for CRAN checks
A <- TMFG(neoOpen, normal = FALSE)$A
modularity <- louvain(A)
# }
Run the code above in your browser using DataLab