num <- reactive(input$num)
num_t <- throttle(num, 1000)
observe({
cat(num_t())
})--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/b7ea3a90-6214-4eb4-be25-770a90e0a115%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Is this what you mean?num <- reactive(input$num) %>% throttle(1000)
On Wed, Aug 2, 2017 at 1:28 PM Dean Attali <daat...@gmail.com> wrote:
Suppose I have a numeric input with ID "num" and in the server I want to refer to `input$num`. I want it to fire no more than once every second, so I want to use the `throttle(r, 1000)` function.This is the code I would:num <- reactive(input$num)
num_t <- throttle(num, 1000)
observe({
cat(num_t())
})I was wondering if there's a more compact way to do this, without having to define a variable that only gets used in one place?
--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discuss+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.