title: Setting shiny selectInput from data.frame
body: <p>I am wanting to set the choices within selectInput using a data frame. Below I have an example of it working, and this gives the choices "Peter", "Bill" and "Bob", but I would like these to be the label, and to set the value from L1Data$ID_1. Something that would normally be coded up using:</p>
  
  <pre><code>    selectInput("partnerName", "Select your choice",  c("Peter" = "15","Bob" = "25","Bill" = "30" ) )
  </code></pre>
  
  <p>Any suggestions for getting this functionality?</p>
  
  <p>ui.R </p>
  
  <pre><code>library(shiny)
  shinyUI(pageWithSidebar(
    headerPanel("Test App"),
    sidebarPanel(
    sliderInput("obs", "Number of observations:", min = 1, max = 1000, value = 500),
  
    htmlOutput("selectUI")
    ),
   mainPanel(
      plotOutput("distPlot")
    )
  ))
  </code></pre>
  
  <p>server.R</p>
  
  <pre><code>library(shiny)
  ID_1 &lt;- c(15,25,30,30)
  Desc_1 &lt;- c("Peter","Bob","Bill","Bill")
  L1Data &lt;- data.frame(ID_1,Desc_1)
  shinyServer(function(input, output) {
    output$distPlot &lt;- renderPlot({
      dist &lt;- rnorm(input$obs)
      hist(dist)
    })
    output$selectUI &lt;- renderUI({ 
      selectInput("partnerName", "Select your choice",  unique(L1Data$Desc_1) )
      })
  })
  </code></pre>