extract_LCC: Extract LCC from a graph

Description Usage Arguments Value Examples

View source: R/extract_LCC.R

Description

Extract LCC from a graph

Usage

1

Arguments

g

is the graph you want to extract the largest connected component

Value

a graph (from igraph) with only the largest connected component

Examples

1
2
3
4
5
6
7
set.seed(12)
x = data.frame(n1 = sample(LETTERS[1:5]),
               n2 =  sample(LETTERS[1:20]))

g = igraph::graph_from_data_frame(x, directed = FALSE)
g = igraph::simplify(g)
LCC = extract_LCC(g)

NetSci documentation built on Dec. 11, 2021, 9:21 a.m.