I am developing one app in shiny dashboard in that I want to dynamically populate dropdown box once csv is uploaded. Dropdown will contain top 10 cities by user registrations which I get from following code.
final_data %>% group_by(registrant_city) %>% summarise(Total = n()) %>% arrange(desc(Total)) %>% top_n(n = 10)
These cities should go into dropdown box.
tabItem("email", fluidRow( box( width = 4, status = "info",solidHeader = TRUE, title = "Send Emails", selectInput("email_select", "Select Email Content", choices = c("Price" = "price","Services" = "service" )), selectInput("cities", "Select City", choices = ?? )) ))
Please help..