get_similarities: Get similarity in membership between communities

Description Usage Arguments Value Examples

View source: R/MTRfuncs.R

Description

Summary of the similarity in membership between dynamic communities in different timesteps, both forwards and backwards.

Usage

1

Arguments

track

A MajorTrack object as produced by do_track.

Value

Dataframe of 6 columns.

The first column 'timestep' is the current timestep, to which timesteps forwards and backwards are being compared (except in the case of the first timestep).

The second column 'group1' is the dynamic community to which dynamic communities in other timesteps are being compared.

The third column 'direction' shows which direction the comparison is being made, either 'forwards' or 'backwards'

The fourth column 'timestep2' indicates in which other timestep the comparison in being made.

The fifth column 'group2' is the dynamic community in 'timestep2' to to which the dynamic community 'group1' is being compared to in 'timestep'

The sixth column shows the similarity in membership between the two dynamic communities as a proportion. A value of 0 indicates that the compared communities contain none of the same members while a value of 1 means the communities are exactly the same.

Examples

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

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