node_in_community() runs through all available community detection algorithms for a given network type, finds the algorithm that returns the largest modularity score, and returns the corresponding membership partition. Where feasible (a small enough network), the optimal problem solving technique is used to ensure the maximal modularity partition. For larger networks, it identifies the applicable algorithms and finds the algorithm that maximises modularity and returns that membership vector.

node_in_community(.data)

Arguments

.data

A network object of class mnet, igraph, tbl_graph, network, or similar. For more information on the standard coercion possible, see manynet::as_tidygraph().

Value

A node_member character vector the length of the nodes in the network, of group memberships "A", "B", etc for each node. If the network is labelled, then the assignments will be labelled with the nodes' names.