R shiny dynamic UI in insertUI
问题 I have a Shiny application where I would like to add a UI element using an action button and then have that inserted ui be dynamic. Here is my current ui file: library(shiny) shinyUI(fluidPage( div(id="placeholder"), actionButton("addLine", "Add Line") )) and server file: library(shiny) shinyServer(function(input, output) { observeEvent(input$addLine, { num <- input$addLine id <- paste0("ind", num) insertUI( selector="#placeholder", where="beforeBegin", ui={ fluidRow(column(3, selectInput