title: RStudio Shiny crashes when using filter_ from dplyr
body: <p>I'm filtering a dataset using dplyr's <code>filter_</code> function in a Shiny app. I'm surrounding the evaluation with a <code>try()</code> so that I can catch errors. This works as expected in some situation like, for example, with an empty filter string. But if the filter string includes a variable that is not in the data.frame Shiny crashes entirely.</p>
  
  <p>Take the following code as an example -- if the filter string is just "" Shiny returns an error (as expected). But if you include "z==1" where z does not exist then the app crashes (not expected!).</p>
  
  <pre><code>library(shiny)
  library(dplyr)
  testapp &lt;- shinyApp(
    ui = bootstrapPage(
      numericInput('n', 'Number of obs', 100),
      plotOutput('plot'),
      uiOutput("whyfail")
    ),
  
    server = function(input, output) {
      output$plot &lt;- renderPlot({ hist(runif(input$n)) })
  
  
      output$whyfail&lt;-renderUI({
        input$n
        dat&lt;-data.frame(a=LETTERS[1:5], b=1:5)
        xx&lt;-try(filter_(dat, ""), silent = TRUE)# returns an error as expected
        #xx&lt;-try(filter_(dat, "z==1"), silent = TRUE) # crashes Shiny
        HTML(paste(attr(xx, "class"), collapse = '&lt;br/&gt;'))
      })
  
  
  
    }
  )
  runApp(testapp)
  </code></pre>
  
  <h3>Update</h3>
  
  <p>My version of dplyr is 0.4.2 and shiny is 0.12.1. Two updates: first, if I run in base R GUI (not RStudio) I don't see the crash. Also, if I don't load dplyr at all the code runs fine with no crash. I am surprised that the code runs given that I would have expected <code>filter_()</code> to depend on dplyr and Shiny does not seem to import dplyr or <code>filter_()</code>).</p>
  
  <p>But I need dplyr and I'd prefer to continue using RStudio so any help would be appreciated.</p>
  
  <h3>Update 2</h3>
  
  <p>I'm using RStudio in Windows 7 v 0.99.446</p>
  
  <h3>Update 3</h3>
  
  <p>Not sure the best place to put this. But this appears to be a genuine bug and is being tackled by RStudio as you can see in this link <a href="https://github.com/rstudio/shiny/issues/879" rel="nofollow">https://github.com/rstudio/shiny/issues/879</a></p>