-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
58 lines (56 loc) · 3.43 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
library(DT)
library(shinythemes)
shinyUI(navbarPage(theme = shinytheme("cerulean"),
# Application title
title = 'Repeat Project',
tabPanel('Table',
sidebarPanel(
selectInput("sport", "Select a sport:",
choices = c("All","400m", "Basketball",
"Field","Gym", "Netball",
"Rowing","Sprint", "Swimming",
"Tennis", "Water Polo")),
radioButtons("radio", label = "Male/Female",
choices = list("Male & Female" = 1,
"Male (0)" = 2,
"Female (1)" = 3),
selected = 1),
sliderInput("height", "Height Range(cm):",
min = 130, max = 220 , value = c(130,220)),
sliderInput("weight", "Weight Range(kg):",
min = 30, max = 130, value = c(30,130)),
downloadButton('downloadData', 'Download')),
mainPanel(
dataTableOutput("athletes"))
),
tabPanel('Visual Breakdown',
tabsetPanel(
tabPanel("Barplot",
h4("Popularity of sport"),
plotOutput("plot")
),
tabPanel("Plot",
sidebarPanel(
selectInput("plot2", "Select chart:",
choices = c("Wt/BMI","WCC/RCC")),
verbatimTextOutput("info"),
sliderInput("n", "Number of athletes", 10, 202,
value = 101, step = 10)
),
mainPanel(
plotOutput("scatPlot", click = "plot_click")
)
)
)
),
navbarMenu("More",
tabPanel("Summary",
verbatimTextOutput("summary")),
tabPanel('About',
paste("The data is basic information collected on athletes.
The columns can be understood as statistical data with the following meaning:
Ht: Height, Wt: Weight, LBM: lean body mass, BMI: body mass index, RCC: red cell count, WCC: white cell count, Bfat: body fat, Ferr: blood cell ferritin.
The sex of the athlete is given as either 0 (male) 1 (female).")
)
)
))