title: R Shiny - Filter data frame using selectInput, Error in UseMethod: no applicable method for 'format_vec_csv' applied to an object of class "logical"
body: <p>I'm building a dashboard with a bar graph that displays the average score in a certain skill or group of skills. The data needs to be filtered by several characteristics chosen in selectInput menus, as in this example (<a href="http://shiny.rstudio.com/gallery/movie-explorer.html" rel="nofollow noreferrer">http://shiny.rstudio.com/gallery/movie-explorer.html</a>). </p>
  
  <p>Since the menu options are slightly different from the levels of the variable, I'm using the answer to this question as a guide (<a href="https://stackoverflow.com/questions/37887482/filtering-from-selectinput-in-r-shiny">Filtering from selectInput in R shiny</a>). Using the code below, I get the error in the title: "Error in UseMethod: no applicable method for 'format_vec_csv' applied to an object of class "logical"." </p>
  
  <p>It's a class issue, which seems to be backed up by the one Google result I found for this error (<a href="https://github.com/rstudio/ggvis/issues/303" rel="nofollow noreferrer">https://github.com/rstudio/ggvis/issues/303</a>). I'm not sure how to go about fixing it. </p>
  
  <p>Ultimately, I'd also like to have the option of presenting choices different from the levels in the data. Found this discussion (<a href="https://stackoverflow.com/questions/20886800/setting-shiny-selectinput-from-data-frame">Setting shiny selectInput from data.frame</a>) but haven't been able to implement it. </p>
  
  <p>Fake data:</p>
  
  <pre><code>library(dplyr)
  SurvDoer &lt;- c(rep("self", 4), rep("coach", 4), rep("mentor", 4))
  Competency &lt;- c(rep("vision", 6), rep("goals", 6))
  Score &lt;- rep(c(2,3,4,5), 3) 
  fake&lt;-data_frame(SurvDoer, Competency, Score)
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>ui &lt;- fluidPage(
    sidebarLayout(
      sidebarPanel(
        uiOutput("choose_source")
      ),
      mainPanel(
        ggvisOutput("avg_bar")
      )
    )
  )
  
  server &lt;- function(input, output, session) {
    #Data
    db &lt;- reactive ({
      fake &lt;- fake %&gt;% 
        group_by(Competency) %&gt;% 
        summarise_(avg = interp(~ mean(x, na.rm=TRUE), x=as.name("Score")))
      data.frame(fake)
    })
  
    #Render selectInput
    output$choose_source &lt;- renderUI({
          sourceOpts &lt;- as.vector(unique(db()$SurvDoer))
          selectInput("source", "Survey Respondent", choices=sourceOpts,                             multiple=TRUE)
    })
  
    dataset &lt;- reactive({
      subset(db(), SurvDoer %in% input$source)
    })
  
    vis &lt;- reactive({
    dataset %&gt;%
      ggvis(~Competency, ~avg) %&gt;%
      layer_bars()
    })
  
    vis %&gt;% bind_shiny("avg_bar")
  }
  
  shinyApp(ui, server)
  </code></pre>