title: Making a dynamic CheckboxGroupInput with shiny
body: <p>I am trying to make a checkbox to be able to filter the dataset by years. However not every variable has all the data for every year so I wanted only the years where the variable has data for shown in the ui. Sadly, after splitting my code into conditional panels the buttons do not filter any longer. </p>
  
  <pre><code>conditionalPanel(condition = "input.Select2 == 'AFD' | input.Select2 == 'Piraten'",
                             checkboxGroupInput("Year", label = h3("Checkbox group"), 
                                                choices =  "2013"),
                                                selected = "2013"),
           conditionalPanel(condition = "input.Select2 == 'DieLinke'",
                           checkboxGroupInput("Year", label = h3("Checkbox group"), 
                                              choices = list("2009", "2013"),
                                              selected = "2013")),
          conditionalPanel(condition = "input.Select2 == 'Gruene' | input.Select2 == 'FDP' | input.Select2 == 'SPD' | input.Select2 == 'CDU'",
                           checkboxGroupInput("Year", label = h3("Checkbox group"), 
                                              choices = list("1998", "2002", "2005","2009", "2013"),
         selected = "2013"))
  </code></pre>
  
  <p>Does anyone know why?</p>
  
  <p>Here's an example of plot being generated in the server function: </p>
  
  <pre><code>dfParteien %&gt;%
                                                  filter(Partei %in% chosen_party) %&gt;% 
                                                  filter(Jahr %in% input$Year) %&gt;%
                                                  count(word) %&gt;%
                                                  with(wordcloud(word, n, max.words = input$Slider1, colors=pal12))
  </code></pre>