How do I sort choices in pickerInput alphabetically and force the choice "Other" to come at the end of the list?

10 Views Asked by At

This is the code for my pickerInput in my shiny application. I want to sort all the choices alphabetically and force "Other" to come at the end of the list.

Here is my code and picture of pickerInput:

a <- c(unique(Data$Mode_group_new))


sidebarPanel(h3("Inputs for histogram"),
             pickerInput(inputId = "Mode_group_new",
                         label = "Select mode category",
                         choices = a,
                         multiple = T,
                         selected = a,
                         options = list(`actions-box`= TRUE)),

enter image description here

0

There are 0 best solutions below