Dynamic Number of Tables with dynamic number of columns and rows - R Shiny


#1

Hi there!

I have a code that generates dataframes based on user inputs. Please find attached my code.

`library(shiny)

runApp(list(
ui = pageWithSidebar(
headerPanel("test"),
sidebarPanel(
numericInput("number","Input No. of tables",value = 1,min=1),
numericInput("rows","Input No. of rows",value = 1,min=1),
numericInput("col","Input No. of cols",value = 1,min=1)),

mainPanel(
column(tableOutput("value"), width = 1))
),
server = function(input,output){
observe({
if (input$number == 0)
return()
isolate({
output$value <-renderUI({
num.inputs.col1 <- paste0("")
lapply(seq(input$number), function(l){
renderTable({
data.frame(EXPERT= replicate(input$col,num.inputs.col1))
},sanitize.text.function = function(x){x})})} )
})
})
}
))`

Do you know how can i access the inputs, and how can i change the names of the tables?