-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.R
50 lines (42 loc) · 872 Bytes
/
index.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
39
40
41
42
43
44
45
46
47
48
49
50
library(shiny)
source("./tab1.R")
source("./tab2.R")
source("./kmean_cluster.R")
ui <- fluidPage(
# external styles
includeCSS("./www/styles.css"),
# title bar
div(
class = "title-bar",
h1("<Application Name>"),
actionButton(
class = "title-bar-button",
"about",
"About",
)
),
div(class = "dummy-title"),
# tabs
tabsetPanel(
type = "tabs",
# add tabs here
tab1,
tab2,
kmean_cluster_tab,
)
)
server <- function(input, output, session) {
# source here for hot reloading: https://github.com/de-data-lab/voucher-eligibility/issues/178
source("./about.R", local = TRUE)
# show about modal
observe({
showModal(
about_modal
)
}) |>
bindEvent(input$about)
# tab io
kmean_cluster_server(input, output, session)
}
# export app
return(shinyApp(ui = ui, server = server))