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")
Run the code above in your browser using DataLab