title: How to I use a variable from the shiny UI outside of a reactive environment?
body: <p><strong>Situation</strong>: I have one input where you can choose "small" or "big", a csv-file with data and another input, where you can choose from a list from the csv depending on your choice of "small" or "big".</p>
  
  <p><strong>Problem</strong>: I cannot find a way to access the variable <code>input$selecter</code> in the <code>updateSelectizeInput</code> function.</p>
  
  <p>Here is my minimal code example which unfortunately does not work:</p>
  
  <pre><code>library(shiny)
  
  ui=fluidPage(
    selectInput('selecter', "Choose ONE Item", choices = c("small","big")),
      selectizeInput('chooser', 'Choose SEVERAL Items', choices = NULL, multiple = TRUE)
  )
  
  server=function(input,output,session){
   DatafromMytable=read.csv("mytable.csv", header=TRUE, sep=";")
   # mysubset=subset(DatafromMytable,Size=="big") #
     mysubset=subset(DatafromMytable,Size==input$selecter)
   updateSelectizeInput(session, "chooser", choices = mysubset$Item) 
  
  }
  
  shinyApp(ui, server)
  </code></pre>
  
  <p><strong>Question</strong>:
  What do I need to change in the line <code>updateSelectizeInput(session, "chooser", choices = mysubset$Item)</code> to make the code work?</p>