extract_LCC: Extract LCC from a graph

View source: R/extract_LCC.R

extract_LCCR Documentation

Extract LCC from a graph

Description

Extract LCC from a graph

Usage

extract_LCC(g)

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

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 Oct. 14, 2024, 5:08 p.m.