title: ShinyR: run code only once after button clicked
body: <p>I run fairly time consuming calculations in a Shiny app once users have selected input parameters. To make sure the calculations don't run unnecessary times I made the following action button:</p>
  
  <pre><code> actionButton('seeData','see Data' )
  </code></pre>
  
  <p>I then tried to only have this time consuming calculation run once per button click (and never when there is no button click) with the following code:</p>
  
  <pre><code> observeEvent( input$seeData, {
  
     ...long, includes several function calls...  
  
  })
  </code></pre>
  
  <p>Within <code>observeEvent</code> I do reference other input parameters. </p>
  
  <p>What I am finding is that the calculation does not run the first time until I press the button, no matter how many times I adjust input parameters. <strong>However, once I press the button once, the calculation runs whenever any input parameter is changed.</strong> Why is the code running a second, third, fourth time (etc) when I have only pressed the button once? </p>
  
  <p>My goal would seem to be just the <a href="http://shiny.rstudio.com/articles/action-buttons.html" rel="noreferrer">typical use case</a>, but I suppose there is something tricky with an <code>observe</code> or <code>isolate</code> aspect of <code>observeEvent</code> that I am not understanding. What am I doing wrong and how can I achieve one click-one calculation functionality?</p>