dendroNetwork: Create hierarchical cluster network diagrams.

Description Usage Arguments Source Examples

Description

Create hierarchical cluster network diagrams.

Usage

1
2
3
4
5
dendroNetwork(hc, height = 500, width = 800, fontSize = 10,
  linkColour = "#ccc", nodeColour = "#fff", nodeStroke = "steelblue",
  textColour = "#111", textOpacity = 0.9, textRotate = NULL,
  opacity = 0.9, margins = NULL, linkType = c("elbow", "diagonal"),
  treeOrientation = c("horizontal", "vertical"), zoom = FALSE)

Arguments

hc

a hierarchical (hclust) cluster object.

height

height for the network graph's frame area in pixels

width

numeric width for the network graph's frame area in pixels

fontSize

numeric font size in pixels for the node text labels.

linkColour

character string specifying the colour you want the link lines to be. Multiple formats supported (e.g. hexadecimal).

nodeColour

character string specifying the colour you want the node circles to be. Multiple formats supported (e.g. hexadecimal).

nodeStroke

character string specifying the colour you want the node perimeter to be. Multiple formats supported (e.g. hexadecimal).

textColour

character vector or scalar specifying the colour you want the text to be before they are clicked. Order should match the order of hclust$labels. Multiple formats supported (e.g. hexadecimal).

textOpacity

numeric vector or scalar of the proportion opaque you would like the text to be before they are clicked. rder should match the order of hclust$labels.

textRotate

numeric degress to rotate text for node text. Default is 0 for horizontal and 65 degrees for vertical.

opacity

numeric value of the proportion opaque you would like the graph elements to be.

margins

numeric value or named list of plot margins (top, right, bottom, left). Set the margin appropriately to accomodate long text labels.

linkType

character specifying the link type between points. Options are 'elbow' and 'diagonal'.

treeOrientation

character specifying the tree orientation, Options are 'vertical' and 'horizontal'.

zoom

logical enabling plot zoom and pan

Source

Mike Bostock: http://bl.ocks.org/mbostock/4063570.

Fabio Nelli: http://www.meccanismocomplesso.org/en/dendrogramma-d3-parte1/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
hc <- hclust(dist(USArrests), "ave")

dendroNetwork(hc, height = 600)
dendroNetwork(hc, treeOrientation = "vertical")

dendroNetwork(hc, height = 600, linkType = "diagonal")
dendroNetwork(hc, treeOrientation = "vertical", linkType = "diagonal")

dendroNetwork(hc, textColour = c("red", "green", "orange")[cutree(hc, 3)],
               height = 600)
dendroNetwork(hc, textColour = c("red", "green", "orange")[cutree(hc, 3)],
               treeOrientation = "vertical")

## End(Not run)

networkD3 documentation built on May 2, 2019, 2:37 a.m.