title: In Shiny, is it possible to select rows from DT, by clicking, as reactive input?
body: <p>Is there a way to take the DataTable output with its selection and use the ones highlighted as the reactive input for the plot? </p>
  
  <pre><code> ui &lt;- basicPage(
    plotOutput("plot1", click = "plot_click"),
    dataTableOutput("table1"),
    verbatimTextOutput("info")
  )
  
  server &lt;- function(input, output) {
    output$table1 &lt;- renderDataTable(({mtcars}))
    #figure out a way to reactively select points to point into output$plot1
    output$plot1 &lt;- renderPlot({
      plot(mtcars$wt, mtcars$mpg)
    })
  
    output$info &lt;- renderPrint({
      # With base graphics, need to tell it what the x and y variables are.
      nearPoints(mtcars, input$plot_click, xvar = "wt", yvar = "mpg")
      # nearPoints() also works with hover and dblclick events
     })
  }
  
  shinyApp(ui, server)
  </code></pre>
  
  <p><a href="https://shiny.rstudio.com/articles/selecting-rows-of-data.html" rel="nofollow noreferrer">https://shiny.rstudio.com/articles/selecting-rows-of-data.html</a>
  <a href="https://shiny.rstudio.com/gallery/datatables-options.html" rel="nofollow noreferrer">https://shiny.rstudio.com/gallery/datatables-options.html</a></p>