title: how to switch off update button in shiny
body: <p>In <code>R</code>'s <code>shiny</code> I want to create an app that includes a function to operate on values given by the user and return the result (the input data as well). I rewrote some examples found on the net and came up with:</p>
  
  <pre><code>library(shiny)
  server &lt;- shinyServer(function(input, output, session) {
  
      values &lt;- reactiveValues()
      values$df &lt;- data.frame(N = numeric(0), A = numeric(0), C = numeric(0))
  
      newEntry &lt;- observe({
  
        if(input$update &gt; 0) {
          gr &lt;- 10 + input$n
          newLine &lt;- isolate(c(input$n, input$nr1, gr))
          isolate(values$df[nrow(values$df) + 1,] &lt;- c(input$n, input$nr1, gr))
                }
      })
  
      output$table1 &lt;- renderTable({values$df})
  
  })
  
  ui &lt;- shinyUI(fluidPage(
    titlePanel("submitButton example"),
    fluidRow(
      column(3, wellPanel(
        sliderInput("nr1", "Give a number: ",  min = 0, max = 100, value = 0, step = 2),
  
        sliderInput("n", "N:", min = 10, max = 1000, value = 200,
                    step = 10),
  
        actionButton("update", "Update Table")
  
      )),
      column(6,
             tableOutput("table1")    
      )
    )
  ))
  shinyApp(ui, server)
  </code></pre>
  
  <p>This is almost what I want with the exception that after the first click on the <code>Update Table</code> button the app updates the table values without waiting for the next click. How to cope with that?</p>