title: Radio buttons with numerical inputs in conditional panels
body: <p>I am trying to make a Shiny app to do calculations as in [this pape
  There are 3 sorts of calculation,called "calcprior", "calcpval" and "calcFPR".  </p>
  
  <p>Which calculation is to be done is chosen by radioButton.  Each calculation requires different inputs. The inputs are placed in conditionalPanels.  The correct names appear in thec onditionalPanel, but the numerical values aren't passed to the server, e.g. input$pval does not have the value entered in the numericInput in the conditional panel.</p>
  
  <p>In contrast the value of nsamp, needed for all 3 calculations, is passed correctly to the server.</p>
  
  <p>I'm a beginner at Shiny, so I hope that someone can explain what's going wrong.  Not being able to see the values of variables makes debugging a million times harder than in regular R.</p>
  
  <pre><code>    sidebarLayout(
  
      sidebarPanel(
       radioButtons("calctype", "Choose calculation:",selected = "calcFPR", 
       choices = c(
      "prior (for given FPR and P val)" = "calcprior",
      "P value (for given FPR and prior)" = "calcpval",    
       "FPR (for given P value and prior)" = "calcFPR")),
  
      conditionalPanel(
       condition = "input.calctype == 'calcprior'",
       numericInput("pval", label = h5("observed P value"), value = 0.05, min 
      = 0, max = 1),
       numericInput("FPR", label = h5("false positive risk"), value = 0.05, 
       min = 0, max = 1)
       ),
  
      conditionalPanel(
       condition = "input.calctype == 'calcpval'",
        numericInput("FPR", label = h5("false positive risk"), value = 0.05, 
        min = 0, max = 1),
        numericInput("prior", label = h5("prior probability of real effect"), 
       value = 0.5, min       = 0, max = 1)
       ),
  
      conditionalPanel(
       condition = "input.calctype == 'calcFPR'",
        numericInput("pval",label = h5("observed P value"),value = 0.05, min = 
        0, max = 1),
        numericInput("prior", label = h5("prior probability of real effect"), 
        value = 0.5, min = 0., max = 1.)
        ),
  
       inputPanel(
        numericInput("nsamp",label = h5("Number in each sample"), step = 1, 
        value = 16, min = 2)
      ),
  
      mainPanel(
  </code></pre>
  
  <p>(I also need to work out how to use the calctype to direct the server to the appropriate block of R code.)</p>