title: shiny how to update value that store in the reactive?
body: <p>Can I update/ change the value that kept in the reactive? For instance,</p>
  
  <pre><code>x &lt;- reactive({
    isolate(input$site1)
  })
  
  # Inpsect values from ui.R.
  output$test &lt;- renderText({
  
      # Take a dependency on input$goButton
      input$goPlot # Re-run when button is clicked
  
      site1 &lt;- isolate(input$site1)
  
      if(site1 == x()){
          site1
      } else {
  
          paste(x(), site1)
          x() &lt;- site1 // this not working obviously.
      }
  
  })
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>The reason I want to do so because I want to store the previous input data <code>input$site1</code> when the user click the button <code>input$goPlot</code> and I want to make sure the use select different option when they click the button again. If they select the same data or do not select any other option and click the button, then I don't want the app to do anything. Hope that makes sense.</p>