【发布时间】:2016-08-16 20:36:56
【问题描述】:
我在sidebarPanel 中有一个下拉菜单,我最多可以从中选择 2 个选项。我想在其中创建一个 if 循环 - 从下拉列表中选择 ('Saddle Joint' 和 'Gliding Joint') 或 ('Saddle Joint' and 'Synovial Fluid') 会导致选择对象 'x' 和 'y'在另一个名为 sidebarPanel 的数据集中 - 基本上是创建一个链接。
我试过这段代码,但它不起作用:
if ("Saddle Joint" %in% input$location & "Gliding Joint" %in% input$location || "Saddle Joint" %in% input$location & "Synovial Fluid" %in% input$location) {
updateCheckboxGroupInput(session,
"datasets", "Datasets:", choices = c("x","y"),
selected= c("x","y"))
}
请看截图! Screenshot
谢谢。
【问题讨论】:
标签: r shiny shiny-server shinydashboard