title: Update data in shiny application without refreshing the whole application
body: <p>I have an application for real time data visualization build with R <code>shiny</code> library. I do periodic data reload from file using <code>reactivePoll</code> function. What I do not like about this is that whenever data reloads the whole application refreshes.</p>
  
  <p>So for example if I have <code>DT</code> table output with selection and I use this selection <code>input$table_rows_selected</code> it resets to <code>NULL</code> whenever data reloads which is not user-friendly at all.</p>
  
  <p>Is it overall possible to change data output without interrupting user?</p>
  
  <p><strong>UPDATE.</strong></p>
  
  <p>Can this be achieved with any other package for displaying tables - <code>googleVis</code> or other?</p>
  
  <p><strong>Working example.</strong></p>
  
  <pre><code>library(shiny)
  library(DT)
  
  runApp(shinyApp(
    ui = fluidPage(dataTableOutput('table')),
    server = function(input, output, session) {
      pollData &lt;- reactivePoll(4000, session,
                               checkFunc = function(){ Sys.time() },
                               valueFunc = function(){ data.frame(id = sample(letters[1:3]), a = runif(3), b = runif(3), c = runif(3)) })
      output$table &lt;- renderDataTable({pollData()})
      proxy &lt;- dataTableProxy('table')
      observeEvent(pollData(), {
        selectRows(proxy, input$table_rows_selected)
      })}
  ))
  </code></pre>
  
  <p>I have taken this example from @NicE answer and added id column. The point is that @NicE answer is OK if one needs certain row to be selected when that row is identified by the row number.</p>
  
  <p>Now suppose I need a row to be selected when that row is identified by some id value. That is if I select a row with id equal b, then the next time data reloads I want the row to be selected with the same id value.</p>