do_track: Run MajorTrack algorithm

Description Usage Arguments Value Examples

View source: R/MTRfuncs.R

Description

do_track runs the MajorTrack algorithm for detecting dynamic communities

Usage

1
do_track(allnets, allcoms, historypar = 2)

Arguments

allnets

A list of igraph networks.

allcoms

A list of detected communities, as returned by many igraph community detection algorithms. The list should be the same length as allnets. Each element of the list should be a vector of integers with the same length as the number of vertices in the corresponding network.

historypar

An integer to set the number of time points (or slices) the algorithm can maximally go back in time to check for majority matches.

Value

A MajorTrack object, which R can interpret as a list. See https://majortrack.readthedocs.io/en/latest/api/majortrack.tracker.html for full details

Dynamic community membership can be extracted using get_dc_membership

Examples

1
2
3
4
5
6
data(allnets)
#detect each networks communities
coms=lapply(allnets,function(x){
  igraph::cluster_louvain(x)
})
track = do_track(allnets, coms, history=1)

jevansbio/MajorTrackR documentation built on Dec. 20, 2021, 11:06 p.m.