title: In Shiny apps for R, how do I delay the firing of a reactive?
body: <p>I have a <code>selectizeInput</code> in my <code>Shiny</code> app. It is in multiple-select mode, so the user can specify more than one selection. </p>
  
  <p>However, the reactives that depend on the <code>selectizeInput</code> get fired every time a selection is added. Suppose that the user intends to select <code>A</code>, <code>B</code> and <code>C</code>. Currently, my app will do it expensive computations for the selections <code>A</code>, <code>A, B</code> and <code>A, B, C</code>, when only the last is required. </p>
  
  <p>The best way I can think to solve this is to delay the firing of the <code>selectizeInput</code> by a second or so to give the user a chance to enter all of the selections. Each new selection should set the timer back to 1 second. I know that <code>Shiny</code> provides an <code>invalidateLater</code> command, but this causes the reactive to fire once now and once later. </p>
  
  <p>How can I get the reactive to <em>only</em> fire once later?</p>