Is it possible for the choices in selectizeInput to be rows from a data frame? If so, would the returned data be a list of items from the selected row? I have been unable to make this work. In the code below, cityInput works fine since the choices are a character vector, but locationInput does not work, the item list in the select box is empty.
This is a common occurrence where user input requires selection based on multiple columns to determine a unique row. In the example below, different cities have the same name and state is used to uniquely determine the location. Pasting the two columns together is one solution, but in complex cases this approach gets messy.
yes, you can use a dataframe as input for the input. It needs to have a label and value column in that case.
The input will show the label and the value is returned as output.
Thank you! It wasn't exactly what I was looking for but it pointed the way toward a solution. Mapping the City and State columns to a unique identifier (in this case a fictitious zip code) enables me to effectively use your suggestion.