Retrieves the largest component. In case of equally sized components the first is component is retrieved.
l_comp(adj, weights = NULL, mode = "undirected", igraph = FALSE)
numeric matrix representing the adjacency matrix.
numeric vector of edge weights. Optional.
character, either "directed"
or "undirected"
,
specifying whether the network should be interepeted as directed
or undirected. Defaults to "undirected"
.
logical specifying whether the output should be of class
"igraph"
.
A list containing the, now, named adjacency matrix and a numeric value indicating the size of the largest component relative to to the entire graph.
# NOT RUN {
# get fluency data
data(animal_fluency)
# edge list of fluency graph
edge_list = threshold_graph(animal_fluency[1:10])
# get adjacency matrix
adj = edg_to_adj(edge_list)
# get largest component
l_comp(adj)
# }
Run the code above in your browser using DataLab