title: How to format the condition in a dynamically generated conditionalPanel in Shiny?
body: <p>I am trying to create widgets in Shiny by using for loop. each block contains:</p>
  
  <ol>
  <li>label</li>
  <li>check box</li>
  <li>choices selector </li>
  <li>Two numeric inputs</li>
  </ol>
  
  <p>I want to do condition for showing or hiding the two numeric inputs according to the value of the check box and the value of the choices selector.
  In the for loop that I created I added an index for each widget variable.
  I am wondering how can I execute the condition of the conditional panel in the for loop knowing that the variables are indexed in their names. Thanks for helping. I share with you the server.R and the UI.R scripts:</p>
  
  <pre><code> library(shiny)
  shinyServer(function(input, output) {
  
    output$input_value2 &lt;- renderUI({
      fluidRow(
  
        lapply(1:8, function(i) {
  
          column(width = 4,
                 output[[paste0('b', i)]] &lt;- renderUI({strong(paste0('Variable N ', i))}),
                 checkboxInput(label = 'Inclued',paste0('c', i)),
                 selectInput(paste0('popDist', i), "Distribution",list("Normal" = "normal","Uniforme" = "uniforme")),
  
                 conditionalPanel(
                   condition = "eval(parse(text=paste0('input.popDist',i)))== 'uniforme'&amp; (eval(parse(text=paste0('input.c',i)))==1",
                   numericInput(paste0('min', i), label = "Min:", value = 1),
                   numericInput(paste0('max', i), label = "Max:", value = 2)
                 ),
  
                 conditionalPanel(
                   condition = "eval(parse(text=paste0('input.popDist',i)))== 'uniforme'&amp; (eval(parse(text=paste0('input.c',i)))==1",
  
                   numericInput(paste0('mean', i), label ="mean:", value = 0),
                   numericInput(paste0('sd', i), label = "st. dev.:", value = 1)
  
                 )
          )
        })
      )
    })
  })
  
      library(shiny)
  shinyUI(fluidPage(
    titlePanel("TEST conditional panel"), 
    uiOutput("input_value2")
    ))
  </code></pre>