title: Shiny reactiveUI reseting value on reload
body: <p>One can use reactiveUI interfaces in shiny to selectively show inputs variables that are relevant only at certain times. Here is an example with a variable "a", which depending on the value causes the interface to show variables "c" or "d":</p>
  
  <p>ui.R </p>
  
  <pre><code>shinyUI(fluidPage(
    sidebarLayout(
      sidebarPanel(
        selectInput("a","choose selection",list("c","d")),
          uiOutput("b")),
        mainPanel(verbatimTextOutput("text"))
      )))
  </code></pre>
  
  <p>server.R</p>
  
  <pre><code>choice_list &lt;- list(
    "c" = selectInput("c", "first set of choices", choices = list("cat","dog","house")),
    "d" = selectInput("d", "second set of choices", choices = list("money","power","fame")))
  shinyServer(function(input, output) {
    output$b &lt;- renderUI({
      choice_list[input$a]
    })  
    output$text &lt;- renderText(paste0(input$c,input$d))
  })
  </code></pre>
  
  <p>So this works good and well, as you can see depending on the context you can select different items. My issue is that each time you switch <code>a</code> the value of what you switch to (either <code>c</code> or <code>d</code>) resets to its default. That isn't a problem here with only one input being shown at a time, but if you imagine that many different input parameters are being shown at once having them all reset each time you switch them in would be awful. Is there any way to store the previous values so that when shiny reloads the UI they don't reset?</p>
  
  <p>Just for a bit more detail, this is just an example of what I am doing with a much larger set of code. I have different analyses the user could run, and each have their own lists of input objects. However they also have a large overlap --many of the input objects in one list show up in another. Currently each time you switch between which analysis you want to do, the entire set of inputs resets, which is very annoying for the users.</p>
  
  <p>Each analysis has some code that it uses to run, and also a list of UI objects to use. These objects live in a different file, which is similar to how the <code>choice_list</code> lives outside of the <code>shinyServer</code> function.</p>