-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
157 lines (130 loc) · 5.45 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
library(shiny)
library(ggplot2)
library(dplyr)
library(markdown)
library(mgcv)
library(psych)
shinyUI(navbarPage(
title = "Caffeine Concentration Predictor",
tabPanel(
title = "Single",
sidebarLayout(
sidebarPanel(
sliderInput(
inputId = "concBWT",
label = "Body Weight (kg)",
min = 20, max = 100, value = 50, step = 1, round=0),
sliderInput('concDose', 'Caffeine Dose (mg)', min=50, max=2000,
value=250, step=50),
helpText('Red Bull®, 80 mg / Monster® and Rockstar®, 160 mg / 5 h Energy Extra
Strength® 242 mg'),
sliderInput('concNum', 'Simulations N', min=5, max=2000,
value=20, step=5),
checkboxInput(inputId = "Log", label = "Log scale")
),
mainPanel(
tags$h3("Concentration-time Curves of Caffeine"),
plotOutput("concplot"),
includeMarkdown("reference.md"),
tags$h3("Duration of Toxic Concentration"),
tableOutput("overlimit"),
#helpText('Duration of Toxic Action'),
tags$h3("Descriptive Statistics of PK parameters"),
tableOutput("conccontents"),
tags$h3("Individual PK parameters"),
dataTableOutput("showdata"),
checkboxInput(inputId = "showme", label = "Show me all the data entries together."),
tableOutput("showdataall")
)
)
),
tabPanel(
title = "Multiple",
sidebarLayout(
sidebarPanel(
sliderInput(
inputId = "superBWT",
label = "Body Weight (kg)",
min = 20, max = 100, value = 50, step = 1, round=0),
sliderInput('superDose', 'Caffeine Dose (mg)', min=50, max=2000,
value=250, step=50),
helpText('Red Bull®, 80 mg / Monster® and Rockstar®, 160 mg / 5 h Energy Extra
Strength® 242 mg'),
sliderInput('superTau', 'Interval (hr)', min=0, max=48,
value=4, step=1),
sliderInput('superRepeat', 'Repeat (times)', min=1, max=24,
value=6, step=1),
sliderInput('superNum', 'Simulations N', min=5, max=2000,
value=20, step=5),
checkboxInput(inputId = "superLog", label = "Log scale")
),
mainPanel(
tags$h3("Concentration-time Curves of Caffeine"),
plotOutput("superplot"),
includeMarkdown("reference.md"),
tags$h3("Descriptive Statistics of PK parameters"),
tableOutput("supercontents")
)
)
),
tabPanel(
title = "Cmax",
sidebarLayout(
sidebarPanel(
sliderInput('cmaxDose', 'Caffeine Dose (mg)', min=50, max=2000,
value=250, step=50),
helpText('Red Bull®, 80 mg / Monster® and Rockstar®, 160 mg / 5 h Energy Extra
Strength® 242 mg'),
sliderInput('cmaxNum', 'Simulations N', min=5, max=2000,
value=20, step=5),
radioButtons(
inputId = "pformat", label = "Plot Format",
choices = c("Sina" = "Sina",
"Jitter" = "Jitter",
"Point" = "Point",
"Boxplot" = "Boxplot"),
selected = "Sina")
),
mainPanel(
tags$h3("Cmax plot"),
plotOutput("plot"),
includeMarkdown("reference.md")
)
)
),
tabPanel(
title = "AUC",
sidebarLayout(
sidebarPanel(
sliderInput('aucDose', 'Caffeine Dose (mg)', min=50, max=2000,
value=250, step=50),
helpText('Red Bull®, 80 mg / Monster® and Rockstar®, 160 mg / 5 h Energy Extra
Strength® 242 mg'),
sliderInput('aucNum', 'Simulations N', min=5, max=2000,
value=20, step=5),
radioButtons(
inputId = "paucformat", label = "Plot Format",
choices = c("Sina" = "Sina",
"Jitter" = "Jitter",
"Point" = "Point",
"Boxplot" = "Boxplot"),
selected = "Sina")
),
mainPanel(
tags$h3("AUC plot"),
plotOutput("aucplot")
)
)
),
tabPanel(
title = "Help",
withMathJax(includeMarkdown("README.md"))
),
tabPanel(
title = "Contact",
includeMarkdown("CONTACT.md"),
includeHTML("disqus.html"),
includeMarkdown("app.md")
)
)
)