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