l_comp {memnet} | R Documentation

## Retrieve largest component

### Description

Retrieves the largest component. In case of equally sized components the first is component is retrieved.

### Usage

    l_comp(adj, weights = NULL, mode = "undirected", igraph = FALSE)

### Arguments

`adj` | numeric matrix representing the adjacency matrix.
`weights` | numeric vector of edge weights. Optional.
`mode` | character, either `"directed"` or `"undirected"`, specifying whether the network should be interepeted as directed or undirected. Defaults to `"undirected"`.
`igraph` | logical specifying whether the output should be of class `"igraph"`.

### Value

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.

### Examples

    # 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)

[Package memnet version 0.1.0 Index]