-
Notifications
You must be signed in to change notification settings - Fork 0
/
s_simulation.R
39 lines (32 loc) · 1.03 KB
/
s_simulation.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
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = 'Master TU QA Dashboard'),
dashboardSidebar(fileInput("mobile", "Choose CSV File",
accept = c(
"text/csv",
"text/comma-separated-values,text/plain",
".csv")
),
tags$hr(),
checkboxInput("header", "Header", TRUE)
),
dashboardBody(
# Boxes need to be put in a row (or column)
dataTableOutput("bottle")
)
)
server <- function(input, output) {
output$bottle <- renderDataTable({
# input$file1 will be NULL initially. After the user selects
# and uploads a file, it will be a data frame with 'name',
# 'size', 'type', and 'datapath' columns. The 'datapath'
# column will contain the local filenames where the data can
# be found.
inFile <- input$mobile
if (is.null(inFile))
return(NULL)
read.csv(inFile$datapath, header = input$header)
})
}
shinyApp(ui, server)