extract_LCC {NetSci} | R 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)
[Package NetSci version 1.0.1 Index]