Q = sum over communities of in / 2m - res (tot / 2m)^2, where in is
the weight of edges inside the community (counted from both ends),
tot the summed strength of its nodes and 2m the total strength
(Newman and Girvan 2004), on the undirected, weighted graph. At res = 1 it lies between -1/2 and 1 (proof("ntmod")). NaN for a graph
without edges. Graph rules as in ntdeg().
Arguments
- from, to
Labels of the two ends of each edge: vectors of the same length (zero when
nodesgives every node) with no missing values.- memb
The community of each node: labels, either named by node (every node named once; other names are ignored) or unnamed, one per node in the order the network functions report nodes.
- w
NULL, or one positive weight per edge (a tie's strength, such as the number of co-offences).- nodes
NULL, or every node's label once: the node order of the results and the way to include isolated nodes.- res
The resolution: one number, at least 0.
References
Newman, M. E. J. and Girvan, M. (2004). Finding and evaluating community structure in networks. Physical Review E, 69(2), 026113. doi:10.1103/PhysRevE.69.026113