nodegroups2communities: Convert nodegroups list to communities object

nodegroups2communitiesR Documentation

Convert nodegroups list to communities object

Description

Convert nodegroups list to communities object

Usage

nodegroups2communities(nodegroups, algorithm = NULL, ...)

Arguments

algorithm

character or NULL, indicating the name of the community detection algorithm used.

  • When algorithm is defined, it is used instead of attr(nodegroups, "algorithm").

  • When algorithm is NULL, attribute(nodegroups, "algorithm") is used if defined, otherwise algorithm="nodegroups".

...

additional arguments are ignored.

wc

communities object as returned by igraph functions such as cluster_optimal(), cluster_walktrap(), or cluster_leading_eigen().

Details

Note that this function is "lossy", in that the output communities object will not contain any supporting data specific to the community detection algorithm originally used. However, the output communities object will be accepted by most igraph related functions that require that object type as an input value.

The names(nodegroups) are used to define a new element in the output communities object "cluster_names", so the names will be maintained in the data. Default igraph functions do not use these names, but they are used by multienrichjam for example by function make_point_hull() which uses these names to label each cluster during plotting.

Value

community object, which is essentially a list with specific required elements:

  • "membership" - integer assignment of nodes to clusters

  • "names" - character list of node names

  • "vcount" - integer number of nodes

  • "algorithm" - character string with the name of the community detection method used.

  • "cluster_names" - character labels associated with membership index values. These names are not generated by igraph community detection, and are therefore optional for use in most igraph workflows. However, they are used in some multienrichjam functions, specifically make_point_hull() which optionally displays a label beside each node cluster during plotting.

See Also

Other jam igraph functions: cnet2df(), cnet2im(), cnetplotJam(), cnetplot_internalJam(), color_edges_by_nodegroups(), color_edges_by_nodes_deprecated(), color_edges_by_nodes(), color_nodes_by_nodegroups(), communities2nodegroups(), drawEllipse(), edge_bundle_bipartite(), edge_bundle_nodegroups(), enrichMapJam(), fixSetLabels(), flip_edges(), get_bipartite_nodeset(), igraph2pieGraph(), jam_igraph(), jam_plot_igraph(), label_communities(), layout_with_qfrf(), layout_with_qfr(), mem2emap(), memIM2cnet(), mem_multienrichplot(), rectifyPiegraph(), relayout_with_qfr(), removeIgraphBlanks(), removeIgraphSinglets(), reorderIgraphNodes(), rotate_igraph_layout(), spread_igraph_labels(), subgraph_jam(), subsetCnetIgraph(), subset_igraph_components(), sync_igraph_communities(), with_qfr()


jmw86069/multienrichjam documentation built on Nov. 3, 2024, 10:29 p.m.