-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
75 lines (58 loc) · 1.96 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
require(shiny)
#' @author Karel A. Kroeze <k.a.kroeze@utwente.nl>
#'
#' File upload adapted from https://github.com/rstudio/shiny-examples/blob/master/009-upload/app.R
#'
ui <- fluidPage(
# Application title
titlePanel("Experiments in file uploading"),
# use tabs to separata data updloading steps from analyses
tabsetPanel(
# upload, preview and add to 'main' data set.
tabPanel("Add data", {
# with a slider input for number of bins
sidebarLayout(
sidebarPanel(
# Input: Select a file ----
fileInput("file", "Choose CSV File",
multiple = FALSE,
accept = c("text/csv",
"text/comma-separated-values,text/plain",
".csv")),
# Horizontal line ----
tags$hr(),
# Input: Checkbox if file has header ----
checkboxInput("header", "Header", TRUE),
# Input: Select separator ----
radioButtons("sep", "Separator",
choices = c(Comma = ",",
Semicolon = ";",
Tab = "\t"),
selected = ","),
# Input: Select quotes ----
radioButtons("quote", "Quote",
choices = c("None" = "",
"Double Quote" = '"',
"Single Quote" = "'"),
selected = '"'),
tags$hr(),
actionButton("add", "Add data")
),
#
mainPanel(
# Preview inputs ---
tags$label("Preview"),
dataTableOutput("preview")
)
)
}),
# a simple tab to check the whole data table
tabPanel("Check data", {
dataTableOutput("main")
}),
# some demonstratitve plots
tabPanel("Analyses", {
plotOutput("analyses")
})
)
)