-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtableFile3colUI.R
57 lines (45 loc) · 2.17 KB
/
tableFile3colUI.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
#' Same as TableFile but with 3 columns
#'
tableFile3colUI <- function(id, inputBoxTitle = "Input", outputBoxTitle = "Output",
csvlabel = "CSV file",
label_1 = "time", label_2 = "logS", label_3 = "temperature",
default_frame = data.frame(c(0, 10), c(7, 6), c(70, 80))) {
ns <- NS(id)
names(default_frame) <- c(label_1, label_2, label_3)
tagList(
fluidRow(
## Input
tabBox(title = inputBoxTitle, id = ns("my_tabBox"), side = "right",
selected = "Excel",
# tabPanel("Old",
# matrixInput(inputId = ns("manual_table"),
# label = paste(label_1, label_2, label_3, sep = " - "),
# data = default_frame)
# ),
tabPanel("Manual",
rHandsontableOutput(ns("hot"))
),
tabPanel("Text",
fileInput(ns("file"), csvlabel),
radioButtons(ns("sep"), "Separator",
c(Comma = ",", Semicolon = ";", Tab = "\t"), "\t"),
radioButtons(ns("dec"), "Decimal Point",
c(Point = ".", Comma = ","), ".")
),
tabPanel("Excel",
fileInput(ns("excel_file"), "Excel file"),
textInput(ns("excel_sheet"), "Sheet name", "Sheet1"),
numericInput(ns("excel_skip"), "Skip", 0)
)
),
## Output
box(title = outputBoxTitle, collapsible = TRUE, status = "primary",
actionButton(ns("update_table"), "Refresh"),
# tableOutput(ns("my_table"))
plotOutput(ns("my_table")),
tags$hr(),
downloadLink(ns("export_table"), "Export")
)
)
)
}