title: r shiny create a dropdown from a column of data in csv
body: <p>My dropdown menu right now is populating with the column names. Instead, i want to create a dropdown that simply uses everything in the first column as the options. can anyone help with my output$toCol function?</p>
  
  <p>server.R:</p>
  
  <pre><code>filedata &lt;- reactive({
    infile &lt;- input$datafile
    if (is.null(infile)) {
    # User has not uploaded a file yet
     return(NULL)
    }
    read.csv(infile$datapath, header = TRUE)
  })
  
  output$toCol &lt;- renderUI({
    df &lt;-filedata()
    if (is.null(df)) return(NULL)
  
    items=names(df)
    names(items)=items
    selectInput("species-dropdown", "Species:",items)
  })
  </code></pre>
  
  <p>ui.R</p>
  
  <pre><code>fileInput('datafile', 'Choose CSV file', accept=c('text/csv', 'text/comma-separated-values,text/plain')),
  uiOutput("toCol")
  </code></pre>