title: R Shiny - No Such Index At Level 1
body: <p>Trying to create a shiny app where the there is a plot and the selected points create a table with said points.</p>
  
  <p>Having some difficulty locating the source of my error, but have been able to narrow it down to these small section.</p>
  
  <pre><code>library(ggplot2)
  library(DT)
  
  ui &lt;- shinyUI(fluidPage(
    fluidRow(uiOutput("plotui")),
    fluidRow(dataTableOutput("plot_brushed_points"))
  ))
  
  server &lt;- shinyServer(function(input, output){
    output$plot &lt;- renderPlot(plot(mtcars$wt,mtcars$mpg))
    output$plotui &lt;- renderUI(plotOutput("plot",brush = brushOpts("plot_brush")))
    output$plot_brushed_points &lt;- renderDataTable(brushedPoints(mtcars,input$plot_brush,mtcars$wt,mtcars$mpg))
  })
  
  myapp &lt;- shinyApp(ui, server)
  myapp
  </code></pre>
  
  <p>The error I receive is the following:</p>
  
  <pre><code>Error in .subset2(x, i, exact = exact) : no such index at level 1
  </code></pre>
  
  <p>For reference both the plot and table appear as required but when you go to select points the table disappears. Any help would be greatly appreciated.</p>