title: conditionalPanel() and if statements - server output not consistent: Rshiny
body: <p>I am using these commands for the ui.R in Shiny. Now each of these methods run individually but when I try running 2 methods from the same group, say group1 methods. It does not show me outputs.</p>
  <p>please look into the sample code or ui and server and suggest changes.</p>
  <p>I am trying to display heatmaps and tables for this kind of data. As shown the server code repeats for method &quot;M&quot;. In that case the methods S doesnt show any plots or tables. Sometimes occasionally, it prints out the table but not the plot. They are named similarly with some changes to the variable names.</p>
  <p><strong>In short, I am able to show the outputs when a method is selected (M or S). I want it to show the outputs when both the methods are selected (M and S)</strong></p>
  <pre><code># packages used
    library(shiny)
    library(shinyjs)
    library(MASS)
    library(preprocessCore)
    library(DT)
    library(pheatmap)
    library(ggplot2)
  #---------ui-----------------
  
  ui &lt;- fluidPage(
    navbarPage(&quot;2 groups of methods&quot;),
    
    tabsetPanel(id = &quot;tabs&quot;, 
                tabPanel(id = &quot;tab1&quot;, title = &quot;Submit info&quot;,
                         hr(),
                         
                         fluidRow(
                           column(10,
                                  wellPanel(
                                    awesomeCheckboxGroup(&quot;method&quot;,
                                                         label = (&quot;group1 methods&quot;),
                                                         choices = c(&quot;M1&quot; = &quot;M&quot;, &quot;S1&quot;='S'),
                                                         inline = TRUE, status = &quot;primary&quot;
                                    ),
                                    
                                    # if method = M or S then execute below.
                                    conditionalPanel(
                                      condition = &quot;input.method.includes('M') || input.method.includes('S')&quot;,
                                      wellPanel(
                                        awesomeCheckboxGroup(inputId = &quot;internal_data&quot;, &quot;Choose our data&quot;,
                                                             c(&quot;one&quot;=&quot;one&quot;, &quot;two&quot;=&quot;two&quot;)),
                                      )
                                    )
                                  )
                           )
                           )
                )
    ),
    tabPanel(title = &quot;plots&quot;,
             fluidRow(column(width = 4,
                             wellPanel(
                               plotOutput(&quot;plot&quot;),
                               
                               DT::dataTableOutput(&quot;table&quot;),
                        
  )
  )
  )
  )
  )
                                  
  
  #---------SERVER-----------------
  server &lt;- function(input, output, session){
      
      plot_method = reactiveVal()
      output_methods &lt;- reactive({
          if(input$internal_data == &quot;one&quot; &amp;&amp; input$method == &quot;M&quot;){
          log_info(&quot;Deconvolution with MUSIC started&quot;)
          isolate({
            x &lt;- data.frame(replicate(10,sample(0:1,100,rep=TRUE)))
            plot_method(pheatmap(x))
          })
        }
        if(input$internal_data == &quot;two&quot; &amp;&amp; input$method == &quot;M&quot;){
          log_info(&quot;Deconvolution with MUSIC started&quot;)
          isolate({
            x &lt;- data.frame(replicate(10,sample(100:101,300,rep=TRUE)))
            plot_method(pheatmap(x))
          })
        }
       x &lt;- x
      })
      
      output$table &lt;- DT::renderDataTable({
        output_methods()
      })
      
      output$plot &lt;- renderPlot({
        plot_method()
      })
      
    }
                                    
  </code></pre>