View source: R/node_conversion_igraph.R
as.igraph.Node | R Documentation |
data.tree
structure to an igraph networkThis requires the igraph package to be installed.
Also, this requires the names of the Nodes
to be unique within
the data.tree
structure.
as.igraph.Node(
x,
vertexAttributes = character(),
edgeAttributes = character(),
directed = FALSE,
direction = c("climb", "descend"),
...
)
x |
The root |
vertexAttributes |
A vector of strings, representing the attributes
in the |
edgeAttributes |
A vector of strings, representing the attributes
in the |
directed |
Logical scalar, whether or not to create a directed graph. |
direction |
when converting to a network, should the edges point from root to children ("climb") or from child to parent ("descend")? |
... |
Currently unused. |
an igraph
object
AreNamesUnique
data(acme)
library(igraph)
ig <- as.igraph(acme, "p", c("level", "isLeaf"))
plot(ig)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.