subset_igraph_components: Subset igraph by connected components

subset_igraph_componentsR Documentation

Subset igraph by connected components

Description

Subset igraph by connected components

Usage

subset_igraph_components(
  g,
  keep = NULL,
  min_size = 1,
  order_by_size = TRUE,
  ...
)

Arguments

g

igraph object

keep

numeric vector indicating which component or components to keep in the final output. When order_by_size=TRUE, components are ordered by size, from largest to smallest, in that case keep=1 will return only the one largest connected subgraph.

min_size

numeric value indicating the number of nodes required in all connected components returned. This filter is applied after the keep argument.

order_by_size

logical indicating whether the connected components are sorted by size, largest to smallest, and therefore re-numbered. Otherwise, the components are somewhat randomly labeled based upon the output of igraph::components().

...

additional arguments are passed to igraph::components().

Details

This function is intended to help drill down into an igraph object that contains multiple connected components.

By default, it sorts the components from largest number of nodes, to smallest, which helps choose the largest connected component, or subsequent components in size order.

The components can also be filtered to require a minimum number of connected nodes.

At its core, this function is a wrapper to igraph::components() and igraph::subgraph().

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(), nodegroups2communities(), rectifyPiegraph(), relayout_with_qfr(), removeIgraphBlanks(), removeIgraphSinglets(), reorderIgraphNodes(), rotate_igraph_layout(), spread_igraph_labels(), subgraph_jam(), subsetCnetIgraph(), sync_igraph_communities(), with_qfr()


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