What I would like to do is have two or more automated functions handled by observe() and kicked off by invalidateLater().This would be inside the server block, as example a clock that 1 fires every second and another function that grabs a large data set and takes like a minute to process. How to keep the clock ticking?
clock1() <- reactiveTimer(intervalMs = 1000, session)
observe({
clock1()
})
output$time1 <- renderText({
clock1()
paste0(as.character(strptime(Sys.time(), format = "%Y-%m-%d %H:%M:%S", tz = "EST")))
})
bigData <- reactiveVal()
observe({
invalidateLater(milliseconds = 10000)
isolate(bigData(getBigData()))
})
output$bigD <- render_htmlTable({
bigData %>% filter()
})
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…