title: action/submit button for multiple numeric inputs in shiny
body: <p>In the shiny application multiple numeric input widgets are generated dynamically each having an initial value inside which are row-column numbers. The sum of those values are also displayed in main panel.
  As the user changes the numeric input values the sum updates accordingly. Currently it is instantly. I want to delay the process of inputs in main panel for all numeric inputs by adding action/submit button till I change more than one numeric Inputs.</p>
  
  <p>But I am getting the following error if action/submit buttons are used inside the render functions. </p>
  
  <blockquote>
    <p>Warning: Error in &lt;&lt;-: number of items to replace is not a multiple of replacement length. </p>
  </blockquote>
  
  <p>If not inside <code>render</code> functions where else to place as these widgets are generated inside <code>renderUI</code> only.</p>
  
  <pre><code>library(shiny)
  
   ui &lt;- shinyUI(fluidPage(
   titlePanel(title = "Use of action/submit button for multiple inputs"), 
   sidebarLayout(
  
  sidebarPanel(numericInput("rows","Input No. of rows",value = 3,min=1),
               br(),
               numericInput("col","Input No. of cols",value = 1,min=1)),
  
  mainPanel(textOutput("display"),
            uiOutput("plo")
  
  )))) 
  </code></pre>
  
  <p>Server.r</p>
  
  <pre><code>server &lt;- function(input,output){
  
  # creating input widgets dynamically
  output$plo &lt;- renderUI({
  z &lt;- input$col
  
  lapply(seq(input$col), function(j){
    column(width=3,
  
           lapply(seq(input$rows),function(i){
             numericInput(inputId = paste0("range",paste0(i,j)),label = j,value = paste0(i,j))  
  
           })
         )
      })
  })
  
  # capturing the value of input widgets in a matrix
  cm &lt;-  reactive({
      c &lt;- input$col
      r &lt;- input$rows
  
     changed_m &lt;- matrix(nrow = r,ncol = c)
  
        lapply(seq(input$col), function(j){
          lapply(seq(input$rows),function(i){
            changed_m[i,j] &lt;&lt;- input[[paste0("range",paste0(i,j))]]  
           })
        })
        changed_m
    }) 
  
  # display the sum
  output$display &lt;- renderText({
       paste0("Sum of matrix:   ",sum(cm()))
  })
  } 
  </code></pre>