tree_network: Create an interactive tree network plot in an htmlwidget

View source: R/tree_network.R

tree_networkR Documentation

Create an interactive tree network plot in an htmlwidget

Description

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)


cjyetman/network.r2d3 documentation built on Aug. 9, 2024, 10:38 p.m.