View source: R/class-network.R
| set_edges | R Documentation |
Replaces the edges in a cograph_network object. Expects a data frame with from, to, and optionally weight columns.
set_edges(x, edges_df)
x |
A cograph_network object. |
edges_df |
A data frame with columns: from, to, and optionally weight. |
The modified cograph_network object.
as_cograph, get_edges, set_nodes
mat <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), nrow = 3)
net <- as_cograph(mat)
new_edges <- data.frame(from = c(1, 2), to = c(2, 3), weight = c(0.5, 0.8))
net <- set_edges(net, new_edges)
get_edges(net)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.