Quantcast
Channel: How to dynamically populate dropdown box choices in shiny dashboard - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by Neil for How to dynamically populate dropdown box choices in shiny dashboard

$
0
0

I got the answer for above. Here is what I did.

ui.RuiOutput("city_dropdown")

And my server.R looks like following

output$city_dropdown <- renderUI({    city <- reg_city(final_data)    city <- city$registrant_city    city <- as.list(city)    selectInput("email_select", "Select Email Content",            choices = city            )})

reg_city() gives me the top 10 cities which I want to populate into drop down box,then converting it to a list gives me desired output.


Viewing all articles
Browse latest Browse all 3

Trending Articles