ui.R 2.49 KB
Newer Older
dmattek's avatar
dmattek committed
1 2 3 4 5 6 7 8

# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#

library(shiny)
dmattek's avatar
dmattek committed
9
library(shinyjs) #http://deanattali.com/shinyjs/
dmattek's avatar
dmattek committed
10 11 12 13 14 15 16 17 18 19 20 21 22
library(plotly)

shinyUI(fluidPage(
  useShinyjs(), # Include shinyjs
  
  # Application title
  title = "Timecourse Inspector",
  
  fluidRow(
    column(3,
           h4("Load data files"),
           #Selector for file upload
           fileInput(
23 24
             'inFileLoadNuc',
             'Select file (e.g. tCoursesSelected.csv) and press "Load Data"',
dmattek's avatar
dmattek committed
25 26
             accept = c('text/csv', 'text/comma-separated-values,text/plain')
           ),
27 28 29
           actionButton("inButLoadNuc", "Load Data"),
           actionButton("butReset", "Reset file input"),
           actionButton('inDataGen1', 'Generate artificial dataset'),
dmattek's avatar
dmattek committed
30
           
31 32 33 34 35
           # fileInput(
           #   'inFileStimLoad',
           #   'Choose CSV file with stimulation times, e.g. stimT.csv',
           #   accept = c('text/csv', 'text/comma-separated-values,text/plain')
           # ),
dmattek's avatar
dmattek committed
36
           
37 38 39 40 41 42 43 44 45 46
           h4("Plot format"),
           fluidRow(
             column(4, 
                    numericInput('inFacetNcol', '#Columns:', value = 4, min = 1, width = '100px', step = 1)),
             column(4, 
                    numericInput('inPlotHeight', 'Height [px]:', value = 800, min = 100, width = '100px', step = 50)),
             column(4, 
                    numericInput('inPlotWidth', 'Width [%]:', value = 100, min = 10, max = 100, width = '100px', step = 10))
           ),
           
47
           actionButton('butGo', 'Plot!')),
dmattek's avatar
dmattek committed
48
    
49
    column(3, offset = 1,
dmattek's avatar
dmattek committed
50 51 52 53
           uiOutput('varSelSite'),
           uiOutput('varSelTrackLabel'),
           uiOutput('varSelTime'),
           uiOutput('varSelMeas1'),
54 55 56 57
           radioButtons('inSelMath', 'Math operation 1st and 2nd meas.:', c('None' = '', 
                                                                            'Divide' = " / ", 
                                                                            'Sum' = " + ", 
                                                                            'Multiply' = " * ", 
58 59
                                                                            'Subtract' = ' - ',
                                                                            '1 / X' = '1 / ')),
dmattek's avatar
dmattek committed
60 61
           uiOutput('varSelMeas2')),
  
62
    column(3, offset = 1,
63 64
           uiOutput('varSelGroup'))
    ),
dmattek's avatar
dmattek committed
65
  br(),
66
  uiOutput('uiPlot')
dmattek's avatar
dmattek committed
67 68
))