Description Usage Arguments Author(s) References Examples
Creates a html file containing json file and a D3.js Dendrogram
1 2 |
JSON |
A json object |
file_out |
the location and name for the output html file |
height |
the height of the dendrogram |
width |
the width of the dendrogram |
radial.diameter |
The diameter of your radial visualisation. Only needed (and used) when radial=TRUE |
collapsible |
Logical TRUE/FALSE as to whether you want the visualisation to be collapsible with a single-click on the nodes |
radial |
Logical TRUE/FALSE as to whether you want the dendrogram to be radial. |
James Thomson & Andrew Patterson
Mike Bostock's lovely d3: http://d3js.org/ and Captain Anonymous' collapsible radial dendrogram here: http://codepen.io/anon/pen/xItvw
1 2 3 4 5 6 7 | hc <- hclust(dist(USArrests), "ave")
plot(hc)
JSON<-jsonHC(hc)
D3Dendro(JSON,width=400, file_out="USArrests_Dendo.html")
D3Dendro(JSON,collapsible=TRUE,file_out="USArrests_Dendo_collapse.html")
D3Dendro(JSON,collapsible=FALSE,radial=TRUE, file_out="USArrests_Dendo_radial.html")
D3Dendro(JSON,collapsible=TRUE,radial=TRUE,file_out="USArrests_Dendo_collapse_radial.html")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.