-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNew
38 lines (27 loc) · 816 Bytes
/
New
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
library(data.tree)
library(treemap)
head(attr)
library(dplyr)
attr[c("pathString")] <- list(NULL)
attr <- setNames(attr, c("x","y","z"))
attr$pathString <- paste("total",
attr$x,
attr$y,
#attr$z,
sep = "/")
attr <- attr [!duplicated(attr[c("x","y")]),]
gx <- attr %>% slice(1:1000)
head(gx)
tree <- as.Node(attr)
plot(tree)
library(igraph)
plot(as.igraph(tree, directed = TRUE, direction = "climb"))
as.igraph(tree)
library(networkD3)
acmeNetwork <- ToDataFrameNetwork(tree, "name")
simpleNetwork(acmeNetwork[-3], fontSize = 12)
useRtree <- as.Node(useRdf, pathDelimiter = "|")
head(attr)
#plot with networkD3
useRtreeList <- ToListExplicit(tree, unname = TRUE)
radialNetwork( useRtreeList)