calc_modularity: Calculation of Modularity for a list of igraph objects

Description Usage Arguments Value Examples

View source: R/calcTopologicalIndices.r

Description

The function calculates modularity of the list of networks in the nullDist parameter. Modularity is calculated using the igraph::cluster_spinglass() if the parameter weights is NULL the atribute "weigths" is used, or if it has the name of an network attribute, that is used as a weigth to build the modules, when this parameter is NA then no weigth is used. Only works for one component networks.

Usage

1
calc_modularity(ig, ncores = 0)

Arguments

ig

list of igraph objects to calculate modularity

ncores

number of cores used to compute in parallel, if 0 sequential processing is used.

Value

a data.frame with the field Modularity

Examples

1
2
3
4
5
## Not run: 
nullg <- generateERbasal(netData[[1]],10)
calc_modularity(nullg)

## End(Not run)

lsaravia/EcoNetwork documentation built on Oct. 26, 2020, 11:09 p.m.