submodularity: Modularity in time-slice specific graph subsets

View source: R/networkRelated.R

submodularityR Documentation

Modularity in time-slice specific graph subsets

Description

The function returns the modularity in an occurrence graph given a provided partitioning

Usage

submodularity(x, graph, bin = NULL)

Arguments

x

(data.frame) The output of the bgpart function.

graph

(igraph) The occurrence graph, which can also be retrieved by bgpart.

bin

(character) The column name of the bin identifier.

Examples

data(ceno6)
# 1. sinlge-slice partitioning
oneC6 <- bgpart(ceno6,bin=NULL, tax="trinomen", cell="icos", ocq=10, base="network", method="infomap")
# return the used graph
oneC6_graph <- bgpart(ceno6,bin=NULL, tax="trinomen", cell="icos", ocq=10, base="network", method=NULL)
# modularity in this single slice
submodularity(oneC6, oneC6_graph)

# 2. multi-slice partitioning
trace <- bgpart(ceno6,bin="stg", tax="trinomen", cell="icos", ocq=10, base="network", method="infomap", tracing=TRUE)
# return the used graph
trace_graph <- bgpart(ceno6,bin="stg", tax="trinomen", cell="icos", ocq=10, base="network", method=NULL, tracing=TRUE)
# modularity in this single slice
submodularity(trace, trace_graph, bin="stg")

adamkocsis/obigeo documentation built on Oct. 14, 2024, 8:46 a.m.