Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

12
  • 2
    Nice solution Nick, which also teaches a good lesson about reactive values generally. Just found that a shiny function (validate) is available now which does the job: shiny.rstudio.com/reference/shiny/latest/validate.html Commented Apr 22, 2016 at 12:03
  • 2
    @ChriiSchee Thanks for the feedback. I've just looked at validate, and it looks as though this offers something different - it allows the programmer to check that all of the inputs are valid, but doesn't allow a delay between updating a value and recalculating the output. Commented Apr 22, 2016 at 16:40
  • @NickKennedy Great explanation +1. Given changes to shiny + future/promises, is this still how you would attack this today? Commented Feb 13, 2019 at 19:50
  • @JasonAizkalns thanks for the comment. I’ve not made use of promises in Shiny yet, but it looks as though they solve a different problem; they allow the Shiny process to better serve multiple users, but in the example given here they wouldn’t avoid the issue of redundant calculations when the user changes two inputs in quick succession. Commented Feb 13, 2019 at 20:31
  • 1
    Thanks @NickKennedy -- seems like a lot of work/upkeep just for a delay. I run into this problem with reactive data.frame objects (filtered from sliders) driving (multiple) plot outputs. This works, but it's a lot of added overhead. Commented Feb 13, 2019 at 20:36