使用 R 和 Shiny 的子类别下拉菜单
Drop down menu with sub category using R and Shiny
我想使用 R 创建一个带有子类别的下拉菜单 - 应该如何引入子类别?
`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
期望的输出:Desired Output
如何创建类似于所需输出的内容?
谢谢!
这可能对你有用:
selectInput("variable", "Variable:",
list("HTML Code tester",
"Font Styler",
"CSS3 Generator"=c( "Box Shadow", "Border Radius")))
我想使用 R 创建一个带有子类别的下拉菜单 - 应该如何引入子类别?
`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 期望的输出:Desired Output
如何创建类似于所需输出的内容?
谢谢!
这可能对你有用:
selectInput("variable", "Variable:",
list("HTML Code tester",
"Font Styler",
"CSS3 Generator"=c( "Box Shadow", "Border Radius")))