title: how to input an ID and reflect different results in two separate tabs in R Shiny
body: <p>This maybe a general question and I will try my best to describe it explicitly. In R Shiny and the <code>ui.R</code> file, I use <code>radioButtons</code> to select one of the two methods:</p>
  
  <pre><code>  radioButtons("Methods", strong("Choose a Method:"),
                   choices = list("method_1" = "m1",
                                  "method_2" = "m2"),
                   selected="method_1"),
  
    selectInput("method_2_ID", strong("Choose an ID (method_2"),
                  topIDs)
  
    mainPanel(
      tabsetPanel(
        tabPanel(title = "method_1_tab1", 
                 plotOutput("plots"), 
        tabPanel(title = "method_2_output1", 
                 tableOutput("m2_output1")),
        tabPanel(title = "method_2_output2", 
                 verbatimTextOutput("m2_output2")))
      ))
  </code></pre>
  
  <p>You can see for method_2, I plan to use two different tabs to show different results, i.e. <code>m2_output1</code> and <code>m2_output2</code>. In my <code>server.R</code> file, I use:</p>
  
  <pre><code>if (input$Methods == "method_2") {
  
    # m2_output1
    updateTabsetPanel(session, "method_2_output1", selected="panel2")
  
    # drop-down menu
    SelectedID = reactive(function(){
      input$method_2_ID
    })
  
    # m2_output1
    output$m2_output1 = renderTable({
      m2[m2$ID == input$method_2_ID, ]
    })
  
    # m2_output2
    updateTabsetPanel(session, "method_2_output2", selected="panel3")
  
    [...]
    output$m2_output2 = renderPrint({
       [...]
      }
    })
  </code></pre>
  
  <p>However, it works only for the <code>method_2_output1</code> tab when I click the ID from the drop-down menu, and when I click the <code>method_2_ouptut2</code> tab, there is nothing displayed (should display <code>verbatimTextOutput("m2_output2)"</code>, I think). Is there anything wrong with my <code>ui.R</code> or <code>server.R</code> files?</p>