-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
39 lines (33 loc) · 1.47 KB
/
ui.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
library(shiny)
library(shinythemes)
shinyUI(fluidPage(
theme=shinytheme("cyborg"),
titlePanel("Victims of Road Accidents in Mediterranean Countries"),
sidebarLayout(
sidebarPanel(
selectInput("Choose","Select",
c(Country="C_Plot",Year="Y_Plot")
),
conditionalPanel(
condition="input.Choose=='C_Plot'",
selectInput(
"geo","Country:-",
c("Algeria","Egypt","Israel","Jordan","Lebanon","Morocco")),
radioButtons("radio","Radio buttons",
c("Summary" = "summary", "Table" = "table"))
),
conditionalPanel(
condition="input.Choose=='Y_Plot'", sliderInput('time','Year Slider(Automatic)',
value = 2000, min =2005, max =2017,animate = TRUE),
radioButtons("radio","Radio buttons",
c("Summary" = "summary", "Table" = "table"))
)),
mainPanel(
fluidRow(
plotOutput("plot"),
conditionalPanel(
condition = "input.radio == 'summary'",verbatimTextOutput("summary")),
conditionalPanel(
condition = "input.radio == 'table'", tableOutput("table")))
))
))