title: Shiny App : getting input choices from an uploaded file
body: <p>I'm trying to use Shiny to get data from a file and use this data to populate a list.</p>
  
  <p>The process is pretty standard. On a server.R file, I get a vector called 'list' by reading a csv file. I want to be able to select the value from this vector with a <code>selectInput()</code> function. So I put an observe loop to check if the file is uploded, and if it's correct, <code>list</code> is created.</p>
  
  <pre><code>observe({
    inFile&lt;-input$DATA
    if(!is.null(inFile)){
      data = read.table(inFile$datapath, header=T,sep=";")
      list=unique(data$SLE)
    }else{
      list=NULL
    }
  })
  </code></pre>
  
  <p>My <code>selectInput()</code> is like this :</p>
  
  <pre><code>output$SLE = renderUI({ selectInput('SLE1', label='Choose the item :', levels(list)) })
  </code></pre>
  
  <p>If I put the <code>selectinput()</code> in the observe loop, the select box works well, except that every time the observe loop is executed, the selectbox is reset. So, it's not a solution.</p>
  
  <p>If I leave the select box out of the observe loop, <code>list</code> keeps the defaut value even if the data file is loaded.</p>
  
  <p>I've tried to set <code>list</code> as a reactive value but it wasn't a success. How can I set <code>list</code>?</p>