如何根據radioButton選擇將2個列表(fooChoices1和fooChoices2)切換到selectInput?在RadioInputButton上的SelectInput中的開關2列表
我希望用2個列表
另外一個全球性的文件,是能夠阻止在SelectInput字符輸入到只有列表中選擇(因爲我開此選擇一個SQL查詢)?
謝謝您的幫助
這裏是我的UI.R:
shinyUI(pageWithSidebar(
headerPanel("Measures"),
sidebarPanel(
radioButtons("base", "Select DB",
c("base1"="base-1","base2"="base-2")),
selectInput("cible", "Select le test:",
choices = fooChoices, selected = "ALL"),
),
mainPanel(
plotlyOutput("plot")
))
這裏我global.R文件:
fooChoices1<-c("ALL" = "00 00%",
"SPEC2" = "00 00297",
"SPEC3" = "00 00323",
"SPEC4" = "00 00362",
"SPEC5" = "00 00366",
"SPEC6" = "00 00399"
)
fooChoices2<-c("ALL" = "00 00%",
"SPEC2" = "00 00297",
"SPEC3" = "00 00323",
"SPEC4" = "00 00362",
"SPEC5" = "00 00366",
"SPEC6" = "00 00399")