title: How to use multiple data.frame objects in one selectInput on shiny/ggplot2 app
body: <p>I am using R 3.2.3 through RStudio Version 0.99.491, on Windows 10 64bit... I am creating a ggplot2 shiny app, that displays a bubble chart. I don't understand the error messages I'm getting except for the fact that it's about inputs:</p>
  
  <pre><code>    Warning in validateSelected(selected, choices, inputId) :  
      'selected' must be the values instead of names of 'choices' for the input 'month'
  
      Warning: Error in ..stacktraceon..: object 'input' not found
      Stack trace (innermost first):
  
      1: shiny::runApp
      Error in ..stacktraceon..({ : object 'input' not found
  </code></pre>
  
  <p>here is the <a href="https://docs.google.com/spreadsheets/d/1FHVT2FMh5lW6Vx_KDwI-ZA2nSgWrOLkdRqEtoWT6qbU/edit?usp=sharing" rel="nofollow">data</a> that I am using. Here is the code </p>
  
  <p>UI</p>
  
  <pre><code>library(shiny)
  library(leaflet)
  
  vars = c("april" = "April","may" = "May","june" = "June","july" = "July")
  
  shinyUI(pageWithSidebar(    
  sidebarPanel(
    selectInput("month", "Month", vars, selected = "april")),
  mainPanel(plotOutput("plot")
  
  )))
  </code></pre>
  
  <p>SEVER</p>
  
  <pre><code>library(shiny) 
  library(leaflet)
  
  
  
  melt_april &lt;- melt(april)
  names(april) = c('departure', 'stop', 'frequency')
  melt_may &lt;- melt(may)
  names(may) = c('departure', 'stop', 'frequency')
  melt_june &lt;- melt(june)
  names(june) = c('departure', 'stop', 'frequency')
  melt_july &lt;- melt(july)
  names(july) = c('departure', 'stop', 'frequency')
  
   monthBy &lt;- input$month
  
  
  
  
  shinyServer( function(input, output){
  observe({
    output$plot &lt;- renderPlot({
  
  
       p &lt;- ggplot(monthBy, aes(x = departure, y =stop, size = frequency, color = frequency)) + 
        geom_point()+
        scale_colour_gradient(low="white",high="orange")+
  
      print(p)
  
    )
  })
  </code></pre>
  
  <p>})</p>