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