ui.R 2.56 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 23 24 25 26 27 28 29 30 31 32 33
library(plotly)

shinyUI(fluidPage(
  useShinyjs(), # Include shinyjs
  
  # Application title
  title = "Timecourse Inspector",
  
  fluidRow(
    column(3,
           h4("Load data files"),
           #Selector for file upload
           fileInput(
             'inFileNucLoad',
             'Choose CSV file with measurement data, e.g. tCoursesSelected.csv',
             accept = c('text/csv', 'text/comma-separated-values,text/plain')
           ),
           
           fileInput(
             'inFileStimLoad',
             'Choose CSV file with stimulation times, e.g. stimT.csv',
             accept = c('text/csv', 'text/comma-separated-values,text/plain')
           ),
           
34 35 36 37 38 39 40 41 42 43
           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))
           ),
           
dmattek's avatar
dmattek committed
44 45 46 47
           actionButton("butReset", "Reset file input"),
           actionButton('butDataGen', 'Generate artificial dataset'),
           actionButton('butGo', 'Go!')),
    
48
    column(3, offset = 1,
dmattek's avatar
dmattek committed
49 50 51 52 53
           uiOutput('varSelSite'),
           uiOutput('varSelTrackLabel'),
           uiOutput('varSelTime'),
           uiOutput('varSelMeas1'),
           uiOutput('varSelRatio'),
54 55 56 57 58
           radioButtons('inSelMath', 'Math operation 1st and 2nd meas.:', c('None' = '', 
                                                                            'Divide' = " / ", 
                                                                            'Sum' = " + ", 
                                                                            'Multiply' = " * ", 
                                                                            'Subtract' = ' - ')),
dmattek's avatar
dmattek committed
59 60
           uiOutput('varSelMeas2')),
  
61 62 63 64 65 66 67
    column(3, offset = 1,
           uiOutput('varSelGroup'),
           checkboxInput('inGroupMore1', 'More grouping?'),
           uiOutput('varSelGroup2'),
           checkboxInput('inGroupMore2', 'More grouping?'),
           uiOutput('varSelGroup3'))
),
dmattek's avatar
dmattek committed
68 69 70 71
  br(),
  uiOutput('outPlot')
))