title: R shiny ERROR: object of type 'closure' is not subsettable
body: <p>I am using the following code and I always get the this subsettable error. 
  What am I subsetting and where am I wrong. 
  This should be some basic entry code that I modified and which did 
  work at some point and I can't see the error. </p>
  
  <p>Thank you</p>
  
  <h1>server.R</h1>
  
  <pre><code>library(shiny)
  
  # Define a server for the Shiny app
  shinyServer(function(input, output) {
  
    # Filter data based on selections
    output$table &lt;- renderDataTable({
      data &lt;- read.table("my.csv", sep =',', header =TRUE)
      if (input$shortdesc != "All"){
        data &lt;- data[data$ShortDescription == input$shortdesc,]
      }
      if (input$taken != "All"){
        data &lt;- data[data$Taken == input$taken,]
      }
      if (input$location != "All"){
        data &lt;- data[data$Location == input$location,]
      }
      data
    })
  
  })
  </code></pre>
  
  <h1>ui.R</h1>
  
  <pre><code>library(shiny)
  # Define the overall UI
  
  shinyUI(
    fluidPage(
      titlePanel("My Items"),
  
      # Create a new Row in the UI for selectInputs
      fluidRow(
        column(4, 
               selectInput("man", 
                           "What:", 
                           c("All", 
                             unique(as.character(data$ShortDescription))))
        ),
        column(4, 
               selectInput("trans", 
                           "Where:", 
                           c("All", 
                             unique(as.character(data$Location))))
        ),
        column(4, 
               selectInput("cyl", 
                           "Who:", 
                           c("All", 
                             unique(as.character(data$Taken))))
        )        
      ),
      # Create a new row for the table.
      fluidRow(
        dataTableOutput(outputId="table")
      )    
    )  
  )
  </code></pre>
  
  <p><strong>Update:</strong></p>
  
  <p>Why does the example (see below) work and the moment I change it to my.csv it breaks ?
  If "data" is a buildin function wouldn't that collide also with the example below ?
  Sorry for not understanding, but this puzzles me.</p>
  
  <p>server.R</p>
  
  <pre><code>library(shiny)
  
  # Load the ggplot2 package which provides
  # the 'mpg' dataset.
  library(ggplot2)
  
  # Define a server for the Shiny app
  shinyServer(function(input, output) {
  
    # Filter data based on selections
    output$table &lt;- renderDataTable({
      data &lt;- mpg
      if (input$man != "All"){
        data &lt;- data[data$manufacturer == input$man,]
      }
      if (input$cyl != "All"){
        data &lt;- data[data$cyl == input$cyl,]
      }
      if (input$trans != "All"){
        data &lt;- data[data$trans == input$trans,]
      }
      data
    })
  
  })
  </code></pre>
  
  <p>ui.R. </p>
  
  <pre><code>library(shiny)
  
  # Load the ggplot2 package which provides
  # the 'mpg' dataset.
  library(ggplot2)
  
  # Define the overall UI
  shinyUI(
    fluidPage(
      titlePanel("Basic DataTable"),
  
      # Create a new Row in the UI for selectInputs
      fluidRow(
        column(4, 
            selectInput("man", 
                        "Manufacturer:", 
                        c("All", 
                          unique(as.character(mpg$manufacturer))))
        ),
        column(4, 
            selectInput("trans", 
                        "Transmission:", 
                        c("All", 
                          unique(as.character(mpg$trans))))
        ),
        column(4, 
            selectInput("cyl", 
                        "Cylinders:", 
                        c("All", 
                          unique(as.character(mpg$cyl))))
        )        
      ),
      # Create a new row for the table.
      fluidRow(
        dataTableOutput(outputId="table")
      )    
    )  
  )
  </code></pre>