title: Getting error while executing R code "Cannot coerce type 'environment' to vector of type 'character'"
body: <pre><code>require(shiny)
  setwd("C://Users//Harshad//Desktop//Equiskill - BA")
  cars &lt;- read.table(file = "cars.csv", sep = ",", header = TRUE, quote="")
  
  var_list &lt;- as.character(names(cars))
  
  
  ui &lt;- fluidPage
  (
    selectInput(inputId = "var",label = "Select Dependent Variable:",choices =    c(var_list))
  )
  
  server &lt;- function(input,output)
  {
  }
  
  shinyApp(ui &lt;- ui, server &lt;- server)
  </code></pre>
  
  <p>I am getting error "ERROR: cannot coerce type 'environment' to vector of type 'character'" while executing above shiny app code in R studio. Please help me resolve the issue.</p>