title: How to Pass Shiny input$ID variables to dplyr function arguments
body: <p>I'm trying to create a simple app that plots the mean of a continuous variable by the levels of a factor.
  The user chooses one of several factors to group by and chooses the continuous variable to average. The app is supposed to display the plot using ggplot. It is easy to get this function to work outside of shiny, but I am struggling to get it to work within the application.
  I know the problem is with my lack of understanding of NSE and SE, but after looking at documentation for a few hours and testing various versions this is the best I could come up with. This appears to be a common problem but I see no answers related to my problem on stack-overflow.</p>
  
  <p>I use the Titanic dataset as an example
  I get the following:</p>
  
  <blockquote>
    <p>Warning in mean.default(input$ContVar) :   argument is not numeric or
    logical: returning NA
    In addition to the error, the mean does  not vary when the plot renders.</p>
  </blockquote>
  
  <pre><code>    library(shiny)
      library(dplyr)
      library(ggplot2)
      Titan &lt;- as.data.frame(Titanic)
      Titan &lt;- mutate(Titan, Freq2 = Freq +3)
  
      shinyApp( ui = basicPage( selectInput("FactVar", "Factor", choices = names(Titan)[1:4]), selectInput("ContVar", "Cont Variable", choices = names(Titan)[5:6]), plotOutput("surv")), server = function(input, output) {
          output$surv &lt;- renderPlot({
              Titan %&gt;%
              group_by_(~input$FactVar) %&gt;%
              summarize_(MeanFreq = ~ mean(input$ContVar))%&gt;%
              ggplot(aes_(x=~ MeanFreq, y = input$FactVar))+geom_point()
          })
      })
  </code></pre>