File: ui.R

package info (click to toggle)
r-cran-rlumshiny 0.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,332 kB
  • sloc: javascript: 922; makefile: 2
file content (64 lines) | stat: -rw-r--r-- 3,486 bytes parent folder | download | duplicates (3)
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
## UI.R
function(request) {
  fluidPage(
    titlePanel(NULL, windowTitle = "RLumShiny - Fast Ratio"),
    sidebarLayout(
      # 2- width = 5 -> refers to twitters bootstrap grid system
      # where the the maximum width is 12 that is to be shared between all
      # elements
      sidebarPanel(width = 5,
                   # include a tabs in the input panel for easier navigation
                   tabsetPanel(id = "tabs", type = "pill", selected = "Data",
                               # Tab 1: Data input
                               tabPanel("Data",
                                        
                                        # informational text
                                        div(align = "center", h5("Data upload")),
                                        # file upload button (data set 1)
                                        fileInput(inputId = "file", 
                                                  label = strong("Measurement file"),
                                                  accept="application/octet-stream, .bin, .binx"),
                                        # import
                                        actionButton(inputId = "import", label = "Import", class = "btn btn-success"),
                                        tags$hr(),
                                        # dynamic elements depending on input file
                                        fluidRow(
                                          column(width = 6,
                                                 uiOutput("positions")
                                                 
                                          ),
                                          column(width = 6,
                                                 uiOutput("curveTypes")
                                          )
                                        )
                               ),##EndOf::Tab_1
                               
                               tabPanel("Curves",
                                        div(align = "center", h5("(De)select individual curves")),
                                        checkboxGroupInput("curves", "Curves")
                               ),##EndOf::Tab_4
                               
                               tabPanel("Export",
                                        selectInput("targetFile", label = "Export to...", 
                                                    choices = list(".bin(x)" = "write_R2BIN",
                                                                   ".csv" = "write_RLum2CSV")),
                                        actionButton("export", "Download file", class = "btn btn-success")
                                        )
                   )##EndOf::tabsetPanel
      ),##EndOf::sidebarPanel
      
      # 3 - output panel
      mainPanel(width = 7,
                # insert css code inside <head></head> of the generated HTML file:
                # allow open dropdown menus to reach over the container
                tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
                tags$head(includeCSS("www/style.css")),
                # divide output in separate tabs via tabsetPanel
                fluidRow(
                  uiOutput("positionTabs")
                )
      )##EndOf::mainPanel
    ),##EndOf::sideBarLayout
    bookmarkButton()
  )##EndOf::fluidPage
}