networkD3 (version 0.2.13)

dendroNetwork: Create hierarchical cluster network diagrams.

Description

Create hierarchical cluster network diagrams.

Usage

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

Examples

Run this code
## 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)

Run the code above in your browser using DataLab