create 2nd input in sidebar by flexdashboard

Hi Team,
I’m trying to create inputs sidebar in flexdashboard.
Now, I can create a hospital name into drop-down list by following code:

Sidebar {.sidebar}

Select a hospital to display:

Hospital_name <- rev(unique(mytest$hospital))
selectInput(“Hospital_name”, label = “Hospital name for … ”,
                       choices = Hospital_name, selected = Hospital_name[[1]])

My question is: I need to create a Department name into second drop-down list. It will show the department name in the list after selecting a hospital. Since the difference hospital may has different department name, I need to create the list from department column from the mytest data frame.
Could you give me some instructions about the second list?
Thanks,
Kai

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.