title: FileInput Button with selectInput in shiny..!
body: <p>I am trying to take the speed variable from the "car" data set which I am uploading to the application. Basically Under select speed: I would like to have all the numbers appearing in the dataset$speed. Under selecInput, the choices should depend upond the data set I am uploading using fileInput. How can I complete this task. For now I have added  the choices as 1,2,3. In theory there should be all values of the speed variable of cars data set.    </p>
  
  <pre><code>library(shiny)
  library(datasets)
  ##the file I am uploading 
  data(cars)
  dataset=write.csv(cars, "dataset.csv")
  
  
  ui=fluidPage( 
  
  actionButton("upload", "Upload File"),
  bsModal("uploadFile", " ", "upload", 
  sidebarLayout(
  sidebarPanel(
  fileInput("file","Choose file to upload")
  
  ),
  mainPanel(
  tableOutput("contents")
  )
  )
  ),  
  
  
  
  sidebarLayout(
  
  sidebarPanel(
  
  column(3, selectInput("selectElement", "Select speed:", c(1,2,3),multiple = 
  T, selectize = F)
  
  )
  ),
  
  mainPanel(
  )
  )
  )
  
  server=function(input,output,session){
  
  output$contents &lt;- renderTable({
  
  inFile &lt;- input$file
  
  if (is.null(inFile))
  return(NULL)
  
  read.csv(inFile$datapath)
  })
  }
  
  shinyApp(ui,server)
  </code></pre>