Examples for 'shiny::reactivePoll'


Reactive polling

Aliases: reactivePoll

Keywords:

### ** Examples

function(input, output, session) {

  data <- reactivePoll(1000, session,
    # This function returns the time that log_file was last modified
    checkFunc = function() {
      if (file.exists(log_file))
        file.info(log_file)$mtime[1]
      else
        ""
    },
    # This function returns the content of log_file
    valueFunc = function() {
      read.csv(log_file)
    }
  )

  output$dataTable <- renderTable({
    data()
  })
}
<srcref: file "" chars 5:1 to 24:1>
<environment: 0x55ccfbb4e218>

[Package shiny version 1.5.0 Index]