Harryy Harryy - 1 year ago 92
R Question

Drop down menu with sub category using R and Shiny

I want to create a dropdown menu with sub-categories using R - how is a sub-category supposed to be introduced?

`if (interactive()) {
ui <- fluidPage(
selectInput("variable", "Variable:",
c("HTML Code tester", "Font Styler", "CSS3 Generator", "Box Shadow", "Border Radius"))


server <- function(input, output) {


shinyApp(ui, server)

Actual output: Actual Output
Desired Output: Desired Output

How do I create something like what's in desired output?


Answer Source

This might work for you:

 selectInput("variable", "Variable:",
              list("HTML Code tester",
                   "Font Styler", 
                   "CSS3 Generator"=c( "Box Shadow", "Border Radius")))
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download