I am trying to implement collapsible network in R based on the blog post more network layouts. However, I am always getting the error of Object not found
.
devtools::install_github
devtools::install_github("timelyportfolio/networkD3@feature/d3.chart.layout")
library(htmltools)
library(networkD3)
hc = hclust(dist(mtcars))
treeNetwork(
as.treeNetwork(hc, "mtcars")
)
tagList(
lapply(
c("tree.cartesian"
,"tree.radial"
,"cluster.cartesian"
,"cluster.radial"
)
,function(chartType){
hierNetwork(as.treeNetwork(hc), type=chartType, zoomable=T, collapsible=T)
}
)
)
tree.cartesian
EDIT 1
How can we use these graphs for an edges file to build a network? Example:
From To
A B
A C
A D
D L
L J
J T
B O