-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.R
38 lines (34 loc) · 1.9 KB
/
app.R
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
if (!require(shiny)) install.packages("shiny")
if (!require(dplyr)) install.packages("dplyr")
if (!require(mstate)) install.packages("mstate")
if (!require(tidyr)) install.packages("tidyr")
if (!require(ggplot2)) install.packages("ggplot2")
if (!require(DiagrammeR)) install.packages("DiagrammeR")
if (!require(cowplot)) install.packages("cowplot")
if (!require(flexsurv)) install.packages("flexsurv")
if (!require(parallel)) install.packages("parallel")
if (!require(jsonlite)) install.packages("jsonlite")
if (!require(data.table)) install.packages("data.table")
if (!require(profvis)) install.packages("profvis")
if (!require(matrixStats)) install.packages("matrixStats")
if (!require(devtools)) install.packages("devtools")
if (!require(multistateutils)) devtools::install_github("stulacy/multistateutils")
ui <- navbarPage("Discrete Event Simulation",
source(file.path("ui", "loaddata.R"), local=T)$value,
source(file.path("ui", "states.R"), local=T)$value,
source(file.path("ui", "attributes.R"), local=T)$value,
source(file.path("ui", "transitions.R"), local=T)$value,
source(file.path("ui", "comparison.R"), local=T)$value,
source(file.path("ui", "simulation.R"), local=T)$value
)
source(file.path("server", "static.R"), local=T)$value
server <- function(input, output, session) {
source(file.path("server", "utils.R"), local=T)$value
source(file.path("server", "loaddata.R"), local=T)$value
source(file.path("server", "states.R"), local=T)$value
source(file.path("server", "attributes.R"), local=T)$value
source(file.path("server", "transitions.R"), local=T)$value
source(file.path("server", "comparison.R"), local=T)$value
source(file.path("server", "simulation.R"), local=T)$value
}
shinyApp(ui=ui, server=server)