View source: R/network-utils.R
| to_data_frame | R Documentation |
Converts a network to an edge list data frame with columns for source, target, and weight.
to_data_frame(x, directed = NULL)
to_df(x, directed = NULL)
x |
Network input: matrix, igraph, network, cograph_network, or tna object. |
directed |
Logical or NULL. If NULL (default), auto-detect from matrix symmetry. Set TRUE to force directed, FALSE to force undirected. |
A base data.frame with one row per edge and exactly three
columns:
from: Source node name/label
to: Target node name/label
weight: Edge weight
Further edge columns, such as session or time from
temporal edge lists, are dropped. get_edges returns the
full edge table. An undirected network contributes one row per unordered
pair.
to_df, to_igraph, as_cograph
to_data_frame(regulation_net)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.