title: How to access R Shiny Input(uploaded) file in another input module?
body: <p>Below I have an R Shiny code to upload an input file to the application. All csv files that'll be uploaded will have a column 'carname'. I want to have a dropdown that's able to access and select choices in that column. How do I access the uploaded file in the ui?</p>
  <p>Error: Error in data$carname : object of type 'closure' is not subsettable</p>
  <pre><code>ui &lt;- fluidPage(
    headerPanel(&quot;Webpapp&quot;),
    sidebarPanel(
      fileInput(inputId = &quot;filedata&quot;,
                label = &quot;Upload the Raw Data File&quot;,
                accept = c(&quot;text/csv&quot;, &quot;text/comma-separated-values,text/plain&quot;,
                           &quot;.csv&quot;)),      
      selectInput(&quot;cars&quot;, &quot;Select car:&quot;, choices = data$carname, selected = &quot;Nissan Sentra&quot;),
     ),
    mainPanel(
      plotOutput('plot'),
      )
  )
  
  # Define server code ####
  server &lt;- function(input, output) {
    
    data &lt;- reactive({
      req(input$filedata)
      read.csv(input$filedata$datapath, skip = 15, header = F)
    })
  
    output$plot &lt;- renderPlot({
       if (is.null(data())) {
        return(NULL)
      }
              
      plot_probe(input$cars) #Plotting function in global
    })
  }
  
  shinyApp(ui = ui, server = server)
  
  </code></pre>