title: Shiny App: How to get total sum by column
body: <p>I have two problems:
  -First I cannot start the table showing only zeros or blank for that reason I've created a button that set's every thing to zero which kind of works but its not ideal. 
  -Secondly, I'm trying to calculate column sum for each column in a rhandontable but so far I havent been able to make it work. </p>
  
  <p>I have been looking around for similar problems and I have found some code that looked promissing but in the end it only provided the sum for a single column or with some changes it would sum up all columns which is not what I'm after. </p>
  
  <pre><code>ui &lt;- fluidPage(
    rHandsontableOutput('table'),
    textOutput('result'),
    actionButton("recalc", "re-enter data")
  )
  
  season&lt;-c("Spring","Summer","Autum","Winter")
  
  server &lt;- function(input,output,session)({
    values &lt;- reactiveValues(data = NULL) ## assign it with NULL
  
    ## button press resets now the data frame
    observeEvent(input$recalc, { 
      values$data[] &lt;- 0
    })
  
    ## changes in numericInput sets all (!) new values
    observe({
      values$data &lt;-data.frame(row.names=season,Lake=1:4,Beach=1:4, Garden=1:4,stringsAsFactors = FALSE)
  
    })
  
    observe({
      if(!is.null(input$table))
        values$data &lt;- hot_to_r(input$table)
    })
  
  
    output$table &lt;- renderRHandsontable({
      req(values$data)
      rhandsontable(values$data,rowHeaderWidth = 100)
    })
  
  })
  
  shinyApp(ui = ui, server = server)
  
  </code></pre>
  
  <p>The expected results would be a 5th column with the sum of each column.
  A starting table filled with zeros or blank.</p>
  
  <p>If anyone could point me in the right direction it would be very much appreciated.</p>