Subset igraph by connected components
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 casekeep=1will 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
keepargument.- 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(),
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(),
nodegroups2communities(),
rectifyPiegraph(),
relayout_with_qfr(),
removeIgraphBlanks(),
removeIgraphSinglets(),
reorderIgraphNodes(),
rotate_igraph_layout(),
spread_igraph_labels(),
subgraph_jam(),
subsetCnetIgraph(),
sync_igraph_communities(),
with_qfr()