title: Same inputs on different tabPanels in navbarPage, Shiny R
body: <p>I have a shiny app with ui that consist of a navbarPage with different tabPanels.
  Inside those I would like to have the same buttons for every tab. So every tab has the same button that links to same inputs.</p>
  
  <p>e.g.</p>
  
  <pre><code>ui &lt;- navbarPage( theme = shinytheme("sandstone"),
                tabPanel(title="number one",
                         fluidRow(column(2, wellPanel(
  
                           sliderInput("one", "slider_one", value =0, min = 0, max=500, step=10),
                           sliderInput("two", "slider_two", value =250, min = 0, max=1000, step=10),
                         )),
                         column(8,
                                dataTableOutput('totals')
                                ))),
  
                  tabPanel(title="number two" ,
                           fluidRow(column(2, wellPanel(
                             sliderInput("one", "slider_one", value =0, min = 0, max=500, step=10),
                             sliderInput("two", "slider_two", value =250, min = 0, max=1000, step=10)
                             )),
                             column(8,
                                           dataTableOutput('totals_2')),
                         )))
  </code></pre>
  
  <p>In the server part of the code I have some reactive values that are dependent on the inputs inserted and some outputs (with different names) that are dependent on the reactive values.</p>
  
  <p>Is it possible to write the code for reactive values only one time, e.g. only for the inputs on the first tabPanel (since they are the same for both panels), or should I define the reactive values for every tabPanel by itself (in that case, I should also rename the inputs, so that they have different names on every tabPanel) ?</p>
  
  <p>e.g</p>
  
  <pre><code>server &lt;- function(input, output) {
  
  react &lt;- reactive({some_function(input$one, input$two)})
  
  output$totals&lt;-renderDataTable({react()
    })
  
  output$totals_2&lt;-renderDataTable({react()
    })
  
  }
  </code></pre>
  
  <p>So instead of that it should write the following.</p>
  
  <pre><code>ui &lt;- navbarPage( theme = shinytheme("sandstone"),
                tabPanel(title="number one",
                         fluidRow(column(2, wellPanel(
  
                           sliderInput("one", "slider_one", value =0, min = 0, max=500, step=10),
                           sliderInput("two", "slider_two", value =250, min = 0, max=1000, step=10),
                         )),
                         column(8,
                                dataTableOutput('totals')
                                ))),
  
                  tabPanel(title="number two" ,
                           fluidRow(column(2, wellPanel(
                             sliderInput("one1", "slider_one", value =0, min = 0, max=500, step=10),
                             sliderInput("two2", "slider_two", value =250, min = 0, max=1000, step=10)
                             )),
                             column(8,
                                           dataTableOutput('totals_2')),
                         )))
      server &lt;- function(input, output) {
  
  react &lt;- reactive({some_function(input$one, input$two)})
  
  react2 &lt;- reactive({some_function(input$one1, input$two2)})
  
  output$totals&lt;-renderDataTable({react()
    })
  
  output$totals_2&lt;-renderDataTable({react2()
    })
  
  }
  </code></pre>
  
  <p>Imo I think that is a lot  of writing especially if you have a lot parameters.</p>