-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
142 lines (142 loc) · 5.99 KB
/
.Rhistory
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
source('~/GitHub/OU-DSA/Systems Optimization/03 - Assignments/01 - Linear Algebra Practice/Linear Algebra Practice Solutions.R', echo=TRUE)
source('~/GitHub/OU-DSA/Systems Optimization/03 - Assignments/01 - Linear Algebra Practice/Linear Algebra Practice Solutions.R', echo=TRUE)
source('~/GitHub/OU-DSA/Systems Optimization/03 - Assignments/01 - Linear Algebra Practice/Linear Algebra Practice Solutions.R', echo=TRUE)
source('~/GitHub/OU-DSA/Systems Optimization/03 - Assignments/01 - Linear Algebra Practice/Linear Algebra Practice Solutions.R', echo=TRUE)
source('~/GitHub/OU-DSA/Systems Optimization/03 - Assignments/01 - Linear Algebra Practice/Linear Algebra Practice Solutions.R', echo=TRUE)
source('~/GitHub/OU-DSA/Systems Optimization/03 - Assignments/01 - Linear Algebra Practice/Linear Algebra Practice Solutions.R', echo=TRUE)
source('~/GitHub/OU-DSA/Systems Optimization/03 - Assignments/01 - Linear Algebra Practice/Linear Algebra Practice Solutions.R', echo=TRUE)
install.packages("network")
library(network)
library(tidyverse)
edge_list <- tibble(from = c(1, 2, 2, 3, 4), to = c(2, 3, 4, 2, 1))
node_list <- tibble(id = 1:4)
edge_list
node_list
library(network)
routes_network <- network(edge_list, vertex.attr = node_list, matrix.type = "edgelist", ignore.eval = FALSE)
plot(routes_network)
plot(routes_network, vertex.cex = 3)
detach(package:network())
detach(package:network
)
install.packages("igraph")
install.packages("Rtools")
rm(A)
rm(B)
rm(AB)
library(tidyverse)
edges <- tibble(from = c(1, 2, 2, 3, 4), to = c(2, 3, 4, 2, 1))
library(tidyverse)
library(igraph)
edges <- tibble(from = c(1, 2, 2, 3, 4), to = c(2, 3, 4, 2, 1))
nodes <- tibble(id = 1:4)
edges
nodes
routes_igraph <- graph_from_data_frame(d = edges, vertices = nodes, directed = TRUE)
plot(routes_igraph, edge.arrow.size = 0.2)
plot(routes_igraph, layout = layout_with_graphopt, edge.arrow.size = 0.2)
install.packages("visNetwork")
install.packages("networkD3")
visNetwork(nodes, edges) %>%
visIgraphLayout(layout = "layout_with_fr") %>%
visEdges(arrows = "middle")
library(visNetwork)
library(networkD3)
library(tidyverse)
library(igraph)
library(visNetwork)
library(networkD3)
edges <- tibble(from = c(1, 2, 2, 3, 4), to = c(2, 3, 4, 2, 1))
nodes <- tibble(id = 1:4)
edges
nodes
routes_igraph <- graph_from_data_frame(d = edges, vertices = nodes, directed = TRUE)
plot(routes_igraph, edge.arrow.size = 0.2)
plot(routes_igraph, layout = layout_with_graphopt, edge.arrow.size = 0.2)
visNetwork(nodes, edges) %>%
visIgraphLayout(layout = "layout_with_fr") %>%
visEdges(arrows = "middle")
edges <- mutate(edges, width = weight/5 + 1)
visNetwork(nodes, edges) %>%
visIgraphLayout(layout = "layout_with_fr")
visNetwork(nodes, edges) %>%
visIgraphLayout(layout = "layout_with_fr") %>%
visEdges(arrows = "end")
visTree(nodes, edges) %>%
visIgraphLayout(layout = "layout_with_fr") %>%
visEdges(arrows = "middle")
visTree(nodes, edges) %>%
visIgraphLayout(layout = "layout_with_fr") %>%
visEdges(arrows = "middle")
visNetwork(nodes, edges, width = "100%") %>%
visHierarchicalLayout(direction = "LR") %>%
visEdges(arrows = "from")
visNetwork(nodes, edges, width = "100%") %>%
visInteraction(dragNodes = FALSE, dragView = FALSE, zoomView = FALSE)
visNetwork(nodes, edges, width = "100%") %>%
visHierarchicalLayout(direction = "LR") %>%
visEdges(arrows = "from")
install.packages("rpart")
data("solder")
res <- rpart(Opening~., data = solder, control = rpart.control(cp = 0.00005))
visTree(res, height = "800px", nodesPopSize = TRUE, minNodeSize = 10, maxNodeSize = 30)
library(rpart)
data("solder")
res <- rpart(Opening~., data = solder, control = rpart.control(cp = 0.00005))
visTree(res, height = "800px", nodesPopSize = TRUE, minNodeSize = 10, maxNodeSize = 30)
install.packages("sparkline")
data("solder")
res <- rpart(Opening~., data = solder, control = rpart.control(cp = 0.00005))
visTree(res, height = "800px", nodesPopSize = TRUE, minNodeSize = 10, maxNodeSize = 30)
View(solder)
edges <- tibble(from = c(1, 2, 2, 3, 4), to = c(2, 3, 4, 2, 5))
nodes <- tibble(id = 1:5)
visNetwork(nodes, edges, width = "100%") %>%
visEdges(arrows = "from") %>%
visHierarchicalLayout()
visNetwork(nodes, edges, width = "100%") %>%
visEdges(arrows = "from") %>%
visHierarchicalLayout() %>%
visLegend()
visNetwork(nodes, edges, width = "100%") %>%
visEdges(arrows = "from") %>%
visHierarchicalLayout() %>%
visLegend()
visNetwork(nodes, edges, width = "100%") %>%
visEdges(arrows = "from") %>%
visHierarchicalLayout() %>%
visLegend(useGroups = FALSE, addNodes = data.frame(label = "Nodes", shape = "circle"),
addEdges = data.frame(label = "link", color = "black"))
visNetwork(nodes, edges, width = "100%") %>%
visEdges(arrows = "from") %>%
visHierarchicalLayout() %>%
visLegend(useGroups = FALSE, addNodes = data.frame(label = "Table", shape = "square"),
addEdges = data.frame(label = "link", color = "black"))
visNetwork(nodes, edges, width = "100%") %>%
visEdges(arrows = "from") %>%
visHierarchicalLayout() %>%
visLegend(useGroups = FALSE, addNodes = data.frame(label = "Table", shape = "circle"),
addEdges = data.frame(label = "link", color = "blue"))
visNetwork(nodes, edges, width = "100%") %>%
visEdges(arrows = "from") %>%
visHierarchicalLayout() %>%
visLegend(useGroups = FALSE, addNodes = data.frame(label = "Table", shape = "circle"),
addEdges = data.frame(label = "link", color = "black"))
visNetwork(nodes, edges, width = "100%") %>%
visEdges(arrows = "from") %>%
visHierarchicalLayout() %>%
visLegend(useGroups = FALSE, addNodes = data.frame(label = "Table", shape = "circle"),
addEdges = data.frame(label = "references", color = "black"))
View(edges)
View(nodes)
View(edges)
View(nodes)
View(edges)
View(nodes)
source("C:/Users/daniel.carpenter/OneDrive - the Chickasaw Nation/Documents/GitHub/Coding-Resources/R/Code_Reuse/- Main Source Files.R")
visNetwork(nodes, edges, width = "100%") %>%
visEdges(arrows = "from") %>%
visHierarchicalLayout() %>%
visLegend(useGroups = FALSE, addNodes = data.frame(label = "Table", shape = "circle"),
addEdges = data.frame(label = "references", color = "black"))
source('~/.active-rstudio-document', echo=TRUE)