I have an igraph (R) graph object named g
like this:
IGRAPH UNW- 6 5 --
+ attr: name (v/c), weight (e/n)
+ edges (vertex names):
[1] 1--4 1--5 1--6 4--2 3--5
I run clustering on it like this:
c1 <- cluster_fast_greedy(g)
I then convert it to a hclust object like this:
hc <- as.hclust(c1)
Checking the labels at this point yields:
> hc$labels
[1] "1" "4" "3" "5" "6" "2"
Then using networkD3, I convert that to a radialNetwork
rad <- as.radialNetwork(hc)
I plot it with (for example):
D3graph <- radialNetwork(List = rad,
fontSize = 10,
opacity = 0.8,
margin=1,
fontFamily = "sans-serif",
nodeColour = "grey",
nodeStroke = "white"
)
But a node named hc
, and a set of unnamed nodes turn up in the dendrogram. Like this: