calc_modularity | R Documentation |
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).
calc_modularity(ig, ncores = 0, cluster_function = cluster_spinglass)
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 |
weights |
Edge weights. Can be a numeric vector,
|
Note: cluster_spinglass()
only works on networks with a single connected component.
A data frame with a column Modularity
containing the modularity values for each network.
## Not run:
nullg <- generateERbasal(netData[[1]], 10)
calc_modularity(nullg, cluster_function = cluster_infomap)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.