How to allow column to adopt based on edited values in rhandsontable

Hi Shiny experts,

Please find the sample code:

library(shiny)
library(readxl)
library(tibble)
library(rhandsontable)
runApp(
  list(
    ui = fluidPage(
  #    titlePanel("Use readxl"),
    #  sidebarLayout(
       # mainPanel(
          # tableOutput('contents')
      rHandsontableOutput("table")#)
          #)
      )
    ,
    server = function(input, output){
      #OUTPUT - dtdata
      output$table <- renderRHandsontable({
        df = data.frame(a=c(1,2,NA,4,5),b=c(6,3,5,2,NA))
        # rownames(df) <- NULL
        df <- remove_rownames(df)
        df["c"] <- df["a"] * df["b"]
        DF <- df
        rhandsontable(DF, rowHeaders = NULL) %>%
          hot_col("c", readOnly = TRUE) 
      }
      
      )
    }
  )
)

After running the App, if we want to make changes to the entered value.
How can we make sure that new value is used to make calculation as well.

Thanks in advance,
Abi

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.