View source: R/wrangle-structure.R
| to_directed | R Documentation |
Convert an Undirected Network to Directed
to_directed(
x,
mode = c("mutual", "arbitrary"),
keep_format = FALSE,
directed = NULL
)
x |
Network input. |
mode |
|
keep_format |
Logical. Return the input format when TRUE. |
directed |
Logical or NULL. Directedness to read the input with. |
A directed cograph_network, or the input format when
keep_format = TRUE.
to_undirected, reverse_edges
adj <- matrix(c(0, 1, 0,
1, 0, 1,
0, 1, 0), 3, 3)
rownames(adj) <- colnames(adj) <- c("A", "B", "C")
to_directed(adj)
to_directed(adj, mode = "arbitrary")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.