Convert communities object to nodegroups list format

communities2nodegroups(wc, ...)

Arguments

wc

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

...

additional arguments are ignored.

Value

list of character vectors, where each vector contains names of igraph nodes. When algorithm is defined in the input object, it is included as an attribute of the output list, accessible with attr(out, "algorithm").

When optional value "cluster_names" is present in the communities

object, they are used to define the output list names.

Details

Note that this function is "lossy", in that the output list does not contain all the information necessary to reconstitute the input communities object in detail. However, the output list can be converted to a communities object that will be accepted by most igraph related functions that require that object type as an input value.