get_giant_component: Returns the giant component of a graph

Description Usage Arguments Value Examples

View source: R/get_giant_component.R

Description

The "giant component" of a graph is defined as the component of the largest order (i.e. most number of nodes)

Usage

1
2
3

Arguments

gr

tidygraph object

Value

the giant component of the input tidygraph object or all components except for the giant component

Examples

1
2
3
4
5
6
gr_large <- quick_forestfire(10, name = LETTERS)
gr_small <- quick_forestfire(5, name = letters)
gr <- tidygraph::bind_graphs(gr_large, gr_small)
gr
get_giant_component(gr)
rm_giant_component(gr)

jhrcook/jhcutils documentation built on Sept. 2, 2020, 7:16 a.m.