How to customize tabPanel added by clicking a button in Shiny
<p>I have a <code>sidebarLayout</code> app in which I've set up buttons to add and remove <code>tabPanel</code>s in the <code>sidebarPanel</code>. However, I can't figure out how to customize those tabPanels. My code is below: </p>

<pre><code>library(shiny)

ui &lt;- fluidPage(
  sidebarLayout(
    sidebarPanel(width = 3, fixed=T,
      h3("L2 Machine"),
      actionButton('moreL2', tags$b('Add L2')),
      actionButton('lessL2', tags$b('Remove L2')),
      uiOutput('panelset'),
      tabPanel("L2panel", 
        numericInput(inputId='L2amount', 'Select L2 Amount', value=0),
        selectInput(inputId='L2type', 'Select L2 Type', c('Percent', 'Absolute')),
        uiOutput('L2daterange')
      )
    ),
    mainPanel(
      verbatimTextOutput('L2a'),
      verbatimTextOutput('L2t')
    )
  )
)

server &lt;- function(input, output) {

  output$L2a &lt;- renderPrint(input$L2amount)
  output$L2t &lt;- renderPrint(input$L2type)

  output$panelset &lt;- renderUI({
    n &lt;- seq(max(input$moreL2 - input$lessL2 + 1, 1))
    tabList &lt;- lapply(paste("Pan", n), tabPanel)
    do.call(tabsetPanel, tabList)
  })

  output$L2daterange &lt;- renderUI({
    dateRangeInput(inputId='L2daterange', 
      label='Select Adjustment Period', 
      start='01-01-2010', end='01-12-2015'
    )
  })
}

shinyApp(ui, server)
</code></pre>

<p>Currently, I have <code>numericInput()</code>, <code>selectInput()</code>, and <code>uiOutput()</code> inside <code>tabPanel()</code>. Instead I want each <code>tabPanel</code> created by clicking the button "Add L2" to have it's own set of <code>numericInput</code>, <code>selectInput</code> and <code>uiOutput</code>.  </p>