title: slow shiny application in R
body: <p>I try to build an shiny app. And it actually it works. Basically I have a dataset (20'000 rows) which i change with sliders and Groupcheckboxes and then plot to a map using ggmap. But it is really slow (a change takes about 10 to 20 seconds). Is there any possibility to make the app running faster. Does it have to do with the subset function? Or is it because of the ggmap plot? I added my generic server code.</p>
  
  <p>would be grateful for every kind of help.</p>
  
  <pre><code>shinyServer(
  
  function(input, output) {
  
  data_subset &lt;- reactive({
  
     subset(pladata_no_na_loc, (pladata_no_na_loc$FUEL_FACTOR == input$fueltype[1] | 
             pladata_no_na_loc$FUEL_FACTOR == input$fueltype[2] |
             pladata_no_na_loc$FUEL_FACTOR == input$fueltype[3] |
             pladata_no_na_loc$FUEL_FACTOR == input$fueltype[4] |
             pladata_no_na_loc$FUEL_FACTOR == input$fueltype[5] |
             pladata_no_na_loc$FUEL_FACTOR ==  input$fueltype[6] |
             pladata_no_na_loc$FUEL_FACTOR == input$fueltype[7]) &amp;
  
           ((pladata_no_na_loc$MW &gt;= input$slider_mw[1]) &amp; (pladata_no_na_loc$MW &lt;          
            input$slider_mw[2] ) ) &amp; 
  
         ((pladata_no_na_loc$MIN_YEAR &gt;= input$slider_year[1]) &amp; (pladata_no_na_loc$MIN_YEAR &lt; 
         input$slider_year[2] ) ), 
         select = c("enipedia_latitude", "enipedia_longitude", "MW_FACTOR", "MW", "FUEL_FACTOR"),   
         drop = FALSE)
  
  
        }) 
  
  
  output$map &lt;- renderPlot({ 
  
  
  
    mapPoints &lt;-  ggmap(map) +  
                geom_point(data = data_subset(), drop = FALSE ,
               aes(x = enipedia_longitude, y = enipedia_latitude, size = MW, color = FUEL_FACTOR), 
               alpha = .5)
  
               print(mapPoints)
  
        }, height = 900, width = 1000)
  
     }
    )
  </code></pre>