list2graph {easybio} | R Documentation |
Convert a Named List into a Graph Based on Overlap
Description
This function creates a graph from a named list, where the edges are determined by the overlap between the elements of the list. Each node in the graph represents an element of the list, and the weight of the edge between two nodes is the number of overlapping elements between the two corresponding lists.
Usage
list2graph(nodes)
Arguments
nodes |
A named list where each element is a vector. |
Value
A data.table representing the graph, with columns for the node names
(node_1
and node_2
) and the weight of the edge (interWeight
).
[Package easybio version 1.1.1 Index]