Convert nodegroups list to communities object
Source:R/jamenrich-communities-nodegroups.R
      nodegroups2communities.RdConvert nodegroups list to communities object
Arguments
- algorithm
- characteror- NULL, indicating the name of the community detection algorithm used.- When - algorithmis defined, it is used instead of- attr(nodegroups, "algorithm").
- When - algorithmis- NULL,- attribute(nodegroups, "algorithm")is used if defined, otherwise- algorithm="nodegroups".
 
- ...
- additional arguments are ignored. 
- wc
- communitiesobject as returned by- igraphfunctions such as- cluster_optimal(),- cluster_walktrap(), or- cluster_leading_eigen().
Value
community object, which is essentially a list with
specific required elements:
- "membership"-- integerassignment of nodes to clusters
- "names"-- characterlist of node names
- "vcount"-- integernumber of nodes
- "algorithm"-- characterstring with the name of the community detection method used.
- "cluster_names"-- characterlabels associated with- membershipindex values. These names are not generated by- igraphcommunity detection, and are therefore optional for use in most- igraphworkflows. However, they are used in some- multienrichjamfunctions, specifically- make_point_hull()which optionally displays a label beside each node cluster during plotting.
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.
See also
Other jam igraph functions:
cnet2df(),
cnet2im(),
cnetplotJam(),
cnetplot_internalJam(),
color_edges_by_nodegroups(),
color_edges_by_nodes(),
color_edges_by_nodes_deprecated(),
color_nodes_by_nodegroups(),
communities2nodegroups(),
drawEllipse(),
edge_bundle_bipartite(),
edge_bundle_nodegroups(),
enrichMapJam(),
fixSetLabels(),
flip_edges(),
get_bipartite_nodeset(),
highlight_edges_by_node(),
igraph2pieGraph(),
jam_igraph(),
jam_plot_igraph(),
label_communities(),
layout_with_qfr(),
layout_with_qfrf(),
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()