View source: R/networkRelated.R
submodularity | R Documentation |
The function returns the modularity in an occurrence graph given a provided partitioning
submodularity(x, graph, bin = NULL)
x |
( |
graph |
( |
bin |
( |
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.