title: How to create a list from subsets of a CSV file
body: <p>I want to make a list for a <code>selectInput</code> from a CSV file, but from a subset made based on two previous <code>selectInput</code>s. This means that on my app:</p>
  <ol>
  <li><p>the user chooses a species name from a list</p>
  <p>radioButtons(&quot;species&quot;, &quot;Which species are you workingwith?&quot;,
  list(&quot;Caretta caretta&quot;=&quot;Cc&quot;,
  &quot;Chelonia mydas&quot;=&quot;Cm&quot;,
  &quot;Dermochelys coriacea&quot;=&quot;Dc&quot;,
  &quot;Eretmochelys imbricata&quot;=&quot;Ei&quot;,
  &quot;Lepidochelys kempii&quot;=&quot;Lk&quot;,
  &quot;Lepidochelys olivacea&quot;=&quot;Lo&quot;,
  &quot;Natator depressus&quot;=&quot;Nd&quot;))</p>
  </li>
  <li><p>the user chooses a nesting area (country) from a list based on the species:</p>
  <p>conditionalPanel(
  condition=&quot;input.country_type=='List' &amp; input.species=='Cc'&quot;,
  selectInput(&quot;country&quot;, &quot;Country:&quot;,
  choices=subset(NestingArea2, Sp=='Cc')$Country)),</p>
  <pre><code>       conditionalPanel(
           condition=&quot;input.country_type=='List' &amp; input.species=='Cm'&quot;,
           selectInput(&quot;country&quot;, &quot;Country:&quot;,
                       choices=subset(NestingArea2, Sp=='Cm')$Country)),
         ......
  </code></pre>
  </li>
  <li><p>and then the user must choose a RMU from a list, which is different for each &quot;species&quot; and &quot;country&quot;. I have tried this and it didn't work:</p>
  <p>selectInput(&quot;rmu&quot;, &quot;RMU:&quot;,
  choices=subset(
  NestingArea2, Sp=='input.species', Country=='input.country')$RMU)</p>
  </li>
  </ol>
  <p>The .csv (NestingArea2) file has 3 columns as follows:   <code>Sp | Country | RMU</code></p>
  <p>I could do what I've done on (2), but since there are many countries, I am searching for something easier.</p>