I'd like to build a dashboard sidebar that has maybe 3 menuItems and when a menuItem is selected a checkBoxGroup will expand below and the user can select any number of options. 我该怎么办?
这是我目前拥有的代码的相关部分。
# ui.R
dashboardSidebar(
# I need a header to say Select a Dataset
# I want the menuItems to be selectable but
menuItem("Dataset 1", newTab = FALSE),
menuItem("Dataset 2", newTab = FALSE),
menuItem("Dataset 3", newTab = FALSE),
# not sure where to put uiOutput so that it appears below
# the selected menuItem
uiOutput("features")
)
# server.R
dataset <- reactive({
df <- read.csv()
return(df)
})
output$features <- renderUI({
checkboxGroupInput("features", "Select features to plot: ",
colnames(df))
})