title: Select input is not working in Shiny application
body: <p>I am trying to build an application in R with Shiny doing the following steps:</p>
  <ol>
  <li>Read the CSV data</li>
  <li>Histogram for every variable</li>
  <li>Further analysis</li>
  </ol>
  <p>I am able to read CSV data but unable to display the colnames of the data in selectinput.</p>
  <p>Code is running but the display of variable names is not working.</p>
  <p>My code is:</p>
  <pre><code>library(shiny)
  ui&lt;-navbarPage(&quot;Model Developement by Subhasish&quot;,
             tabPanel(&quot;Data Import&quot;,sidebarLayout(sidebarPanel( fileInput(&quot;file&quot;,&quot;Upload your CSV&quot;,multiple = FALSE),
                                                                tags$hr(),
                                                                h5(helpText(&quot;Select the read.table parameters below&quot;)),
                                                                checkboxInput(inputId = 'header', label = 'Header', value = FALSE),
                                                                checkboxInput(inputId = &quot;stringAsFactors&quot;, &quot;stringAsFactors&quot;, FALSE),
                                                                radioButtons(inputId = 'sep', label = 'Separator', choices = c(Comma=',',Semicolon=';',Tab='\t', Space=''), selected = ',')
             ),
             mainPanel(uiOutput(&quot;tb1&quot;))
             ) ),
             tabPanel(&quot;Histogram&quot;,sidebarLayout(sidebarPanel(
               selectInput(&quot;headers&quot;,&quot;Select variable to view Histogram&quot;,choices =as.list(names(data)),multiple = FALSE)),mainPanel(&quot;mainpanel&quot;))),
             tabPanel(&quot;More&quot;)
  )
  server&lt;-function(input,output) { data &lt;- reactive({
    file1 &lt;- input$file
    if(is.null(file1)){return()} 
    read.table(file=file1$datapath, sep=input$sep, header = input$header, stringsAsFactors = input$stringAsFactors)
    
  })  
  output$table &lt;- renderTable({
    if(is.null(data())){return ()}
    data()
  })
  output$tb1 &lt;- renderUI({
    tableOutput(&quot;table&quot;)
  })
  }
  shinyApp(ui=ui,server=server)
  </code></pre>