-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
83 lines (73 loc) · 3.03 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
shinyUI(
pageWithSidebar(
headerPanel("Metis - Agronomy module"),
sidebarPanel(
includeHTML("www/js/tools.js"),
includeHTML('www/js/lr.js'), # needed for livereload
wellPanel(
# if there are no datasets available only show the UI to make data available
conditionalPanel(condition = "input.datasets != ''",
includeHTML('www/tools.html')
),
uiOutput("datasets")
),
# only show data loading and selection options when in dataview
conditionalPanel(condition = "input.tool == 'dataview'",
conditionalPanel(condition = "input.datatabs != 'Visualize'",
wellPanel(
fileInput("upload", "Load data (Rdata, CSV, Spss, Stata or Microsoft Excel format)"),
# HTML("<label>Load user data: (.rda | .csv | .sav | .dta)</label>"),
# actionButton("upload", "Choose a file"),
# helpText("Loading user data disabled on Shiny-Server"),
br(), br(),
selectInput(inputId = "packData", label = "Load package data:", choices = packDataSets, selected = '', multiple = FALSE)
)
),
conditionalPanel(condition = "input.datatabs == 'Data view' && input.datasets != ''",
wellPanel(
uiOutput("nrRows"),
uiOutput("columns"),
tags$style(type='text/css', "#columns { height: 250px; padding-bottom: 35px;}")
)
),
conditionalPanel(condition = "input.datatabs == 'Visualize'",
wellPanel(
uiOutput("vizvars1"),
uiOutput("vizvars2"),
conditionalPanel(condition = "input.vizvars2 != ''",
uiOutput("viz_color"),
uiOutput("viz_facet_row"),
uiOutput("viz_facet_col"),
checkboxInput('viz_jitter', 'Jitter', value = FALSE),
checkboxInput('viz_smooth', 'Smooth', value = TRUE)
)
)
)
),
conditionalPanel(condition = "input.tool != 'dataview'",
uiOutput("analysis_ui_controls")
# submitButton("Test")
)
),
mainPanel(
conditionalPanel(condition = "input.datasets != ''",
conditionalPanel(condition = "input.tool == 'dataview'",
tabsetPanel(id = "datatabs",
tabPanel("Data view", tableOutput("dataviewer")),
tabPanel("Visualize", plotOutput("visualize", width = "100%", height = "100%")),
# tabPanel("Transform", tableOutput("transform")), # once transform has been implement use tableOutput
tabPanel("Transform", verbatimTextOutput("transform")),
tabPanel("About", includeMarkdown("about.md"))
)
),
conditionalPanel(condition = "input.tool != 'dataview'",
tabsetPanel(id = "analysistabs",
tabPanel("Summary", verbatimTextOutput("summary")),
tabPanel("Plots", plotOutput("plots", width = "100%", height = "100%")),
tabPanel("Log", verbatimTextOutput('logwork'))
)
)
)
)
)
)