Creating a drop-down list through shiny, using atomic vector

I'm working on a simple shiny app and I'm trying to create a drop-down list using one of the columns "Department" (which is a character atomic vector) in the excel data which I imported into RStudio, the code I'm using is as follows:

selectInput("select", "Select Department/Entity",
    choices = unique(Key_Risks["Department"]))

when I run the app, nothing appears in the drop-down list, the only thing that appears is "NA", not the department names!

Your support would be highly appreciated.
Drop-down menue

Hi, welcome!

There is nothing wrong with the code you have shared so the problem must lay in the interaction of the code with your specific data (Key_Risks) but you have not shared a sample with us so, to help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at these resources, to see how to create one for a shiny app

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.