Harryy Harryy - 3 months ago 23
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?



This might work for you:

 selectInput("variable", "Variable:",
              list("HTML Code tester",
                   "Font Styler", 
                   "CSS3 Generator"=c( "Box Shadow", "Border Radius")))