title: R Shiny error: object input not found
body: <p>The following code is my Shiny ui:</p>
  
  <pre><code>library(shiny)
  shinyUI(fluidPage(
  
  titlePanel("All Country Spend"),
  
    sidebarLayout(
      sidebarPanel(  selectInput("split", 
          label = "Choose Fill For the Chart",
          choices = c("Action.Obligation","Action_Absolute_Value"),
        selected = "Action.Obligation"
          )
              ),
      mainPanel(plotOutput("SpendChart"))
  )
  ))
  </code></pre>
  
  <p>And the following is the server code:</p>
  
  <pre><code>library(shiny)
  library(ggplot2)
  
  shinyServer(function(input, output) {
  
  spend &lt;- read.csv("data/Ctrdata.csv")
  output$SpendChart &lt;- renderPlot({
  
      Country &lt;- spend$Principal.Place.of.Performance.Country.Name
      ggplot(spend, aes(x = Country, y = input$split)) + geom_bar(stat = "identity")
  
  })
  
  })
  </code></pre>
  
  <p>Every time I run it I get the following error:</p>
  
  <blockquote>
    <p>"Error in eval(expr, envir, enclos) : object 'input' not found"  </p>
  </blockquote>
  
  <p>I am trying to render a simple bar chart that will toggle between the net and absolute value of contract spending in each country, but it won't recognize my input named "split" from the <code>selectInput</code> box.</p>
  
  <p>Here is a sample of my data frame:</p>
  
  <pre><code>data.frame(Country = c("Turk", "Turk", "Saudi", "Saudi", "Ger", "Ger"),
  Action.Obligation = c(120,-345,565,-454, 343,-565),
  Action_Absolute_Value = c(120,345,565,454,343,565))
  </code></pre>