title: Issues accessing Inputs from renderUI in R Shiny
body: <p>I'm new to Shiny, but am working on an app that requires a lot of back and forth between the UI and the shinyServer. To do this, I've familiarized myself with the dynamic renderUI function. However, I'm having some issues properly working with the inputs that are sent to the UI through the renderUI function. </p>
  
  <p>I've coded up a quick toy example of my issue.</p>
  
  <pre><code>library(shiny)
  
  ui &lt;- fluidPage(
  numericInput("cat.count", "How many cats do you have?", min = 0, value = 0),
  checkboxInput('pet.check',"Do you other pets?", value = FALSE),
  uiOutput("dog.input"),
  uiOutput("dog.num")
  )
  
  server &lt;- shinyServer(function(input,output){
  
  output$dog.input &lt;- renderUI({
  if(input$pet.check){
      return(checkboxInput("dog.check", "Do you have dogs?", value = FALSE))
  }
  })
  output$dog.num &lt;- renderUI({
  if (exists("input$dog.check") &amp; input&amp;dog.check){
      return(numericInput("dog.count", "How many dogs do you have?", min = 1, 
  value = 0))
  }
  
  })
  
  })
  
  shinyApp(ui = ui,server = server)
  </code></pre>
  
  <p>Once this toy app runs without errors, the "final product" would be a simple bar chart via geom_bar with ggplot2 graphics showing the total number of pets that the user owns.</p>
  
  <p>I've researched the reactive() function a lot in addition to the req() and exists() functions, but so far, I've been running around in circles.</p>
  
  <p>Thanks in advance!</p>