list2graph | R Documentation |
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.
list2graph(nodes)
nodes |
A named list where each element is a vector. |
A data.table representing the graph, with columns for the node names
(node_x
and node_y
) and the weight of the edge (weight
).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.