title: How to work out "Error in tbl_vars(y) : argument "y" is missing, with no default" in Shiny?
body: <p>I really need some useful help.</p>
  
  <p>I've wrote code, but it doesn't work. However, nearly same example is working perfectly.</p>
  
  <p>Here is what I got:</p>
  
  <pre><code>      Warning: Error in tbl_vars: argument "y" is missing, with no default
        Stack trace (innermost first):
          45: tbl_vars
          44: as.vector
          43: base::intersect
          42: intersect.default
          41: intersect
          40: common_by
          39: inner_join.tbl_sql
          38: inner_join
           1: shiny::runApp
          Error in tbl_vars(y) : argument "y" is missing, with no default
  </code></pre>
  
  <p>I'm new to R and especially Shiny.
  Please, help. </p>
  
  <p>Here is the code and <a href="https://groups.google.com/group/shiny-discuss/attach/5878fc4ce80a9/corruption.db?part=0.1&amp;authuser=0&amp;view=1" rel="nofollow">dataset</a> + files are attached.</p>
  
  <p>ui.R</p>
  
  <pre><code>library(shiny)
  library(ggvis)
  library(datasets)
  
  actionLink &lt;- function(inputId, ...) {
  tags$a(href='javascript:void',
       id=inputId,
       class='action-button',
       ...)
       }
  
       shinyUI(fluidPage(
       titlePanel("Corruption: Evidence from round the World" ),
       fluidRow(
       column(4,
       wellPanel(
  
  textInput("country", "Country's Name"),
  
  
       selectInput("country", label = h5("Select the Country"), 
                   choices = list("All" = 1, "Choice 2" = 2,
                                  "Choice 3" = 3, "All"), selected = 1),
       selectInput("country", label = h5("Select the Kind of Country's Association"), 
                   choices = list("EU" = 1, "BRICS" = 2,
                                  "None" = 3), selected = 3),
  
         sliderInput("cpi", "Corruption Perception Index", 0, 100, step = 1, value = 27), # в скобках значения, которые горят для привлечения внимания к панели и объясняют, как ей пользоваться
  
  
         sliderInput("ief", "Index of Economic Freedom", 0, 100, step = 0.1, value = 51.9),                   
  
  
         sliderInput("hdi", "Human Development Index", 0, 1, step = 0.01, value = 0.80),
  
  
         sliderInput("gini", "GINI Index", 0, 100, step = 0.1, value = 41.6),                   
  
  textInput("crate", label = h5("Credit Rating (S&amp;P)"), value = "Enter rating..."))
    )
  ),
     fluidRow(
     column(4,  
     wellPanel(
  
  selectInput("xvar", "X-axis variable", axis_vars, selected = "gdp"),
  selectInput("yvar", "Y-axis variable", axis_vars, selected = "hdi")
    ),
  
      mainPanel(
      ggvisOutput("plot")
  
      )))
      )
      )
  </code></pre>
  
  <p>server.R</p>
  
  <pre><code>    library(shiny)
      library(ggvis)
      library(dplyr)
      if (FALSE) library(RSQLite)
  
  
      db &lt;- src_sqlite("corruption.db")
      corruption &lt;- tbl(db, "corruption")
  
      all_c &lt;- inner_join(corruption)
  
  
      shinyServer(function(input, output, session) {
  
      corruption &lt;- reactive({
      gdp &lt;- input$gdp
      gni &lt;- input$gni
      finv &lt;- input$finv
  
  c &lt;- all_c %&gt;%
    filter(
      CPI &gt;= cpi,
      IndexOfEconomicFreedom &gt;= icf,
      HDI &gt;= hdi,
      GINI &gt;= gini
    ) %&gt;%
  arrange(CPI)
  
    })
  
    vis &lt;- reactive({
  
  xvar_name &lt;- names(axis_vars)[axis_vars == input$xvar]
  yvar_name &lt;- names(axis_vars)[axis_vars == input$yvar]
  
  xvar &lt;- prop("x", as.symbol(input$xvar))
  yvar &lt;- prop("y", as.symbol(input$yvar))
  
  corruption %&gt;%
    ggvis(x = xvar, y = yvar) %&gt;%
    layer_points(size := 50, size.hover := 200,
                 fillOpacity := 0.2, fillOpacity.hover := 0.5) %&gt;%
    add_axis("x", title = xvar_name) %&gt;%
    add_axis("y", title = yvar_name) %&gt;%
    set_options(width = 500, height = 500)
  
      })
  
       vis %&gt;% bind_shiny("plot")
  
      })
  </code></pre>
  
  <p>global.R</p>
  
  <pre><code>      axis_vars &lt;- c(
        "Corruption Perception Index" = "cpi",
        "Index Of Economic Freedom" = "icf",
        "HDI" = "hdi",
        "GINI" = "gini",
        "Foreign Investments" = "finv",
        "GDP per capita" = "gdp"
         )
  </code></pre>
  
  <p>Great THANKS in advance!!!!</p>