How can I update plot from rhandsontable with uploaded data, without clicking into the table first?
<p>I am building a shiny app with rhandsontable so that the user can edit values in the table and then update the corresponding plot using an action button. I would also like them to be able to upload a file, which will then populate the table, and then update the plot. </p>

<p>As of right now I have managed to allow the user to upload a file which populates the handsontable, but in order for the action button to update the plot, they must first click into the table and hit enter.</p>

<p>I would like them to be able to update the plot from an uploaded file without having to click into the table and hit enter.Does anybody know how to do this?</p>

<p>Maybe it has to do with input$contents and output$contents not being in-sync as read in the following link, but I am not sure:</p>

<p><a href="https://github.com/jrowen/rhandsontable/blob/master/vignettes/intro_rhandsontable.Rmd#shiny" rel="nofollow">https://github.com/jrowen/rhandsontable/blob/master/vignettes/intro_rhandsontable.Rmd#shiny</a></p>

<p>Example of .csv file that would be uploaded currently:</p>

<pre><code>Currency   Values
EUR            10
GBP            20
CAD             5
</code></pre>

<p>My code so far:</p>

<pre><code>library(shiny)
library(rhandsontable)

empty_mat = matrix(1,nrow = 3, ncol = 1)
curr_names = c("EUR","GBP","CAD")
empty_dat = cbind.data.frame(curr_names,empty_mat)
names(empty_dat) = c("Currency","Values")


ui = fluidPage(sidebarLayout(
    sidebarPanel(
      fileInput('file1', 'Choose CSV File'),
      rHandsontableOutput('contents'),
      actionButton("go", "Plot Update")
    ),
    mainPanel(
      plotOutput("plot1")
    )
))

server = function(input, output) {

  indat &lt;- reactive({
    inFile &lt;- input$file1
    if (is.null(inFile))
      return(rhandsontable(empty_dat))
    raw_input = read.csv(inFile$datapath, header=T)
    return(rhandsontable(raw_input))
  })

  output$contents &lt;- renderRHandsontable({
    indat()
    })

  portfoliovals &lt;- eventReactive(input$go, {
    live_data = hot_to_r(input$contents)[,2]
    return(live_data)
    })

  output$plot1 &lt;- renderPlot({
    plot(portfoliovals()~c(1,2,3),type = "l")
  })

}


shinyApp(ui, server)
</code></pre>

<p>Update 9/27/16:</p>

<p>The author has kindly pushed a new branch of the package on github which for now allows the original code to work without issue. 
See <a href="https://github.com/jrowen/rhandsontable/issues/111" rel="nofollow">https://github.com/jrowen/rhandsontable/issues/111</a> for more details.</p>