I am trying to create a table with a certain number of rows that the user define, the user might change at any time this number. I have tried many different times to do that, which should be a simple task, but with no success. On my last try I keep receiving the following error message:
Error in makeFunction(body = expr, env = env) :
argument "expr" is missing, with no default
Here is my code, if anyone can give me any insight of what am I doing wrong I would appreciate!
Thanks
ui <- shinyUI(fluidPage(
tabPanel("Well data",
titlePanel("Enter well basic data information"),
mainPanel(
fluidRow(
column(6,
numericInput(inputId = "NumberFlowZones",
label = "Number of flow zones",
value = 3,
width = "200px")
)
),
fluidRow(
column(12,
hotable("InterpFlowZones"),hotable("SimulFlowZones"))
)))))
server<- function(input,output,session){
A = data.frame(matrix(ncol=6, nrow=observeEvent(input$NumberFlowZones))) # init - input matrix A
output$InterpFlowZones <- renderHotable({data.frame(A)}, readOnly = FALSE)
R = data.frame(matrix(ncol=7, nrow=observeEvent(input$NumberFlowZones)))
output$SimulFlowZones <- renderHotable({data.frame(R)}, readOnly = TRUE)
}
shinyApp(ui, server)
If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it: