
Update module assignments from an existing column in graph object
Source:R/update_graph_modules.R
update_graph_modules2.RdUses the values of an existing node column as the new module assignment,
updating Modularity, modularity2, and modularity3
for seamless integration with ggNetView(). All other node columns
are preserved.
Arguments
- graph_obj
A graph object returned by
build_graph_*().- modules_new
Character. Name of an existing column in
graph_objnodes whose values define the new module assignment. The column may or may not contain"Others".- levels
Character vector. Optional explicit module order. If
NULL, order by module size (descending) and place"Others"at the end when present.