title: How do you fill dropdown from a database using R Shiny?
body: <p>I want to fill a drowndown list in an R shiny application with the results of a query from a database.</p>
  
  <pre><code>#I have a global.r file where i put this code:
  getData&lt;- function()
  {
    ....this function returns a single column of names. I tested that it does work.
  }
  
  #Now in my ui.r file I try to use the function to populate a dropdown list like:
  source('global.r')
  shinyUI(pageWithSidebar(
  selectInput("names", "Select Data",getData(),selected="Name 1" multiple = FALSE)
  ),
  </code></pre>
  
  <p>When I run this the dropdown is populated with the header of the query but not the entire list that is returned in the query.</p>
  
  <p>Any ideas.</p>
  
  <p>Thank you!</p>