Description Usage Arguments Source Examples
View source: R/d3ClusterDendro.R
Create a D3 JavaScript Cluster Dendrogram graphs.
1 2 3 4 5 6 | d3ClusterDendro(List, height = 2200, width = 900, heightCollapse = 0,
widthCollapse = 0.5, fontsize = 10, linkColour = "#ccc",
nodeColour = "#3182bd", textColour = "#3182bd", opacity = 0.8,
diameter = 980, zoom = FALSE, parentElement = "body",
standAlone = TRUE, file = NULL, iframe = FALSE,
d3Script = "http://d3js.org/d3.v3.min.js")
|
List |
a hierarchical list object with a root node and children. |
height |
numeric height for the network graph's frame area in pixels. |
width |
numeric width for the network graph's frame area in pixels. |
heightCollapse |
numeric proportion of the overall graph |
widthCollapse |
numeric proportion of the overall graph |
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). |
textColour |
character string specifying the colour you want the text to be before they are clicked. Multiple formats supported (e.g. hexadecimal). |
opacity |
numeric value of the proportion opaque you would like the graph elements to be. |
diameter |
numeric diameter for the network in pixels. |
zoom |
logical, whether or not to enable the ability to use the mouse scroll-wheel to zoom in and out of the graph. |
parentElement |
character string specifying the parent element for the
resulting svg network graph. This effectively allows the user to specify
where on the html page the graph will be placed. By default the parent
element is |
standAlone |
logical, whether or not to return a complete HTML document (with head and foot) or just the script. |
file |
a character string of the file name to save the resulting graph.
If a file name is given a standalone webpage is created, i.e. with a header
and footer. If |
iframe |
logical. If |
d3Script |
a character string that allows you to specify the location of the d3.js script you would like to use. The default is http://d3js.org/d3.v3.min.js. |
Mike Bostock http://bl.ocks.org/mbostock/4063570.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
# Download JSON data
library(RCurl)
URL <- "https://raw.github.com/christophergandrud/d3Network/master/JSONdata/flare.json"
Flare <- getURL(URL)
# Convert to list format
Flare <- rjson::fromJSON(Flare)
# Recreate Bostock example from http://bl.ocks.org/mbostock/4063570
d3ClusterDendro(List = Flare,
file = "FlareCluster.html", zoom = TRUE,
fontsize = 10, opacity = 0.9,
widthCollapse = 0.8)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.