-
Notifications
You must be signed in to change notification settings - Fork 1
/
ui.R
119 lines (111 loc) · 5.02 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
####################################
##
## User Interface for
## MCP-S-Age
##
####################################
library(shiny)
library(shinyBS)
library(shinydashboard)
library(shinyjs)
library(markdown)
library(yada)
source("R/panel_longbone.R", local = TRUE)
source("R/panel_dentition.R", local = TRUE)
source("R/panel_fusion.R", local = TRUE)
tagList(
useShinyjs(),
navbarPage(title="MCP-S-Age",
theme="app.css",
id="tabs",
# First Panel: Input
tabPanel("Input",
value="input",
div(class="fluid-row",
div(class="col-sm-3", id="sidebar",
h3("Case Information"),
textInput("analyst","Analyst (Required)",
placeholder="Name"),
textInput("caseid","Case ID (Required)"),
numericInput("xknown","Known Age",
value=NA),
hr(),
h3("Model Options"),
selectInput("refsamp","Reference Sample",
choices=c("Global"="all",
"USA"="US"),
selected="US")
),
div(class="col-sm-9", id="mainbar",
div(class="fluid-row", id="topbar",
column(2,
actionButton("reset",
"Reset Inputs",
icon("trash"))),
column(8, align="center",
h5("Check Your Input: ",
style="font-weight:700;"),
tableOutput("case_data")),
column(2,
shinyjs::disabled(
actionButton("run",
"Run Analysis",
icon("arrow-right"))))),
br(), br(), br(),
div(class="row",
shinyjs::hidden(h3("Generating report...",
id = "waitInput"))),
br(),
div(class = "fluid-row", id="panels",
longbone_panel, dentition_panel,
fusion_panel)
),
)
), # close Input
# Second Panel: Output
tabPanel("Output",
value="output",
downloadButton("downloadReport","Download Report"),
hr(),
shinyjs::hidden(h3("Generating results,
please wait...", id = "wait")),
textOutput("report_case"),
textOutput("report_analyst"),
textOutput("report_datetime"),
textOutput("report_version"),
hr(),
shinyjs::hidden(wellPanel(
h5("Age Estimation"),
DT::dataTableOutput("post"),
id = "post_panel"
)),
div(class="row",
column(4,
selectInput("plot_var","Select Model to Plot:",
choices="None"),
selectInput("ci","Credible Interval Range",
choices=c(95,99))
),
column(8, shinyjs::hidden(plotOutput("post_plot")))
),
wellPanel(id="mod-info",
h5("Model Info"),
tableOutput("modsamp"),
br(),
tags$b("Model trained using the following variables: "),
textOutput("model_vars")
),
wellPanel(
h5("Case Data"),
tableOutput("case")
)
), # close Output
# Third Panel: About
tabPanel("About",
value="about",
includeMarkdown("www/md/MCP-S-Age-About.Rmd"),
br(), br()
) # close About
# ) # close tabsetPanel
) # close navbarPage
)