View source: R/compute_graph_modul.R
compute_graph_modul | R Documentation |
The function computes modules from a graph by maximising modularity.
compute_graph_modul( graph, algo = "fast_greedy", node_inter = NULL, nb_modul = NULL )
graph |
An object of class |
algo |
A character string indicating the algorithm used to create the modules with igraph.
|
node_inter |
(optional, default = NULL) A character string indicating whether the links of the graph are weighted by distances or by similarity indices. It is only used to compute the modularity index. It can be:
|
nb_modul |
(optional , default = NULL) A numeric or integer value indicating the number of modules in the graph. When this number is not specified, the optimal value is retained. |
A data.frame
with the node names and the corresponding
module ID.
P. Savary
data("data_tuto") mat_gen <- data_tuto[[1]] graph <- gen_graph_thr(mat_w = mat_gen, mat_thr = mat_gen, thr = 0.8) res_mod <- compute_graph_modul(graph = graph, algo = "fast_greedy", node_inter = "distance")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.