The tree_network
function creates an interactive tree network plot in an htmlwidget
Usage
tree_network(
data,
width = NULL,
height = NULL,
treeType = "tidy",
direction = "right",
linkType = "diagonal",
...,
viewer = "internal"
)
Arguments
- data
a tree network description in one of numerous forms (see details)
- width, height
width and height of exported htmlwidget in pixels (single integer value; default == NULL)
- treeType
type of tree; one of "tidy" or "cluster" (see details) (default == "tidy")
- direction
direction toward which the tree grows; one of "right", "left", "down", or "up" (see details) (default == "right")
- linkType
type on link shape; one of "diagonal" or "elbow" (see details) (default == "diagonal")
- ...
other options (see details)
- viewer
whether to view the plot in the internal viewer or browser
Examples
treedf <- data.frame(nodeId = LETTERS[1:7],
parentId = c("", "A", "A", "B", "B", "C", "C"),
name = LETTERS[1:7],
stringsAsFactors = FALSE)
tree_network(treedf)