title: Filter drop down list based on checkboxinput option
body: <p>my objective is to filter Country options based on the LMIC column value. Where <code>if(population$LMIC == 'YES')</code> I would like the Countries that have 'YES' value to be displayed in the drop down. <code>else(population$LMIC == 'NO')</code> then I would like the Countries that 'NO' value to be displayed in the drop down.
  <a href="https://i.stack.imgur.com/yypK1.png" rel="nofollow noreferrer">Here is my xlsx file</a></p>
  <p>This is currently what I have for my UI.</p>
  <pre><code>div(
                                      id = &quot;dashboard&quot;,
                                      pickerInput(
                                          inputId = &quot;selectedCountry&quot;,
                                          labelMandatory (&quot;Country&quot;), 
                                          choices = population$Country,
                                          multiple = FALSE,
                                          selected = &quot;Czech Republic&quot;, #character(0),# 
                                          options = pickerOptions(
                                              actionsBox = TRUE,
                                              title = &quot;Please select a country&quot;)
                                      ),
                                      
                                      checkboxInput(inputId = &quot;filterLMIC&quot;, label = strong(&quot;Filter LMIC&quot;), value = FALSE),
  </code></pre>
  <p>This is currently what I have for my server,</p>
  <pre><code>observeEvent(input$filterLMIC,{
        if(filterLMIC == TRUE){
            updatePickerInput(session, inputId='selectedCountry',
                              choices = population$LMIC,
                              choicesOpt = list(
                                if(population$LMIC == 'YES'){
                                  disable
                                }
                              )
                          
                              )
          
        }
      })
  </code></pre>
  <p>I'm not sure where to go from here.</p>