-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
86 lines (83 loc) · 4.62 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
library(shinyjs); library(shinyalert); library(shinyBS); library(plotly);
library(DT);
options(shiny.maxRequestSize=50*1024^2);
# apparently in some environments loading this from global.R doesn't reach here
# or doesn't reach here immediately
if(file.exists('project_uitext.R')) source('project_uitext.R');
shinyUI(fluidPage(
shiny::tags$head(shiny::tags$link(rel="shortcut icon", href="favicon.ico"))
,includeCSS('df.css'),useShinyjs(),useShinyalert()
#,tags$script(src = "codehr.js")
,fluidRow(h3("CODEHR: Clinical Open Dashboard for Electronic Health Records")
,em('A free, open-source app made possible by support from'
,'NIH/NCATS UL1TR001120 (IIMS) and the'
,'Long School of Medicine KL2 Award.'
,'Source code available on',a('GitHub',href=gitlink
,target='_blank'))
,br()
,strong(txtPageSubtitle))
,mainPanel(
width=12,fluidRow(
column(2,id='leftcol'
,bsCollapse(id="filters",multiple=T #,open="Basic"
,bsCollapsePanel(title=span("Basic",icon('angle-down'))
,value="Basic"
,span(span(id='hBasic'
,hidden(icon('question-circle')))
,'Choose category of variables'
,' to compare.')
,selectInput('selBasic',''
,selBasicChoices
,selected = selBasicDefault
#,multiple=T
)
)
,bsCollapsePanel(title=span("Advanced"
,icon('angle-down'))
,value="Advanced"
,sliderInput('slN','Count cutoff'
,min=50,max=2000
,value=slidevals$N
,step = 1)
,hr()
,sliderInput('slOR'
,'Odds ratio cutoff'
,min=1.1,max=4
,value=slidevals$OR
,step=0.01)
,hr()
,numericInput('slChi'
,'False Discovery Rate'
,min=0
,max=1
,step=0.01
,value=slidevals$Chi)
# ,sliderInput('slChi'
# ,'Chi square cutoff'
# ,min=.Machine$double.eps
# #,max=2000
# ,max=0.3
# ,step=0.00001
# ,value=slidevals$Chi)
,hr()
,actionButton('breset'
,'Reset Sliders')
)
)
,hidden(actionButton('bupdate',tagList('Update plot',br()
,'and counts')))
#,if(file.exists('.debug')) actionButton('bdebug','Debug') else c()
,uiOutput('uidebug')
)
,column(9,textOutput('maintext'),br()
,plotlyOutput('plotmain',width = '79vmin',height = '70vmin'))
)
,fluidRow(bsCollapse(id="details"
,bsCollapsePanel(span("Counts and percentages"
,icon('angle-down'))
,dataTableOutput('tblsel'))))
,uiOutput('uidebuginfo')
)
)
);
c()