-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.R
More file actions
35 lines (31 loc) · 820 Bytes
/
Copy pathapp.R
File metadata and controls
35 lines (31 loc) · 820 Bytes
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
# A Shiny app to plot network graph using ggnet2
#
# Run: shiny::runApp('~/Documents/Repos/programs/R/Plot-Network-Graph-App.R')
library(GGally)
library(intergraph)
library(ITNr)
ui <- fluidPage(
fluidRow(
style="text-align:center; color:#fbfcfc; vertical-align:center; background-color:#333333",
titlePanel("Electrical Automotive Goods 2016 Network")
),
fluidRow(
style="height:100vh",
plotOutput("myplot", width="100%", height="100%")
)
)
server <- function(input, output)
{
output$myplot <- renderPlot({
data("ELEnet16")
net <- asNetwork(ELEnet16)
ggnet2(
net,
node.size=6,
node.color="region",
edge.size="weight",
edge.color="darkgrey"
)
})
}
shinyApp(ui, server)