This function calculates the modularity of a list of networks provided in the ig parameter.
Modularity measures the strength of division of a network into modules (communities).
Arguments
- ig
A list of igraph objects for which modularity will be calculated.
- ncores
Number of cores used for parallel computation. If set to 0, sequential processing is used.
- cluster_function
The igraph clustering function to use, or a function that returns modularity. default
cluster_spinglass.If a network has a 'weight' edge attribute it is used both by the clustering function and to compute the (weighted) modularity of the resulting partition.
Examples
if (FALSE) { # \dontrun{
nullg <- generateERbasal(netData[[1]], 10)
calc_modularity(nullg)
} # }