假设我有一个下拉列表sidebarPanel - location
,我最多可以从中选择 2 个选项。我想创建一个 if 循环,其中从下拉列表中选择“鞍形接头”和“滑动接头”会导致在另一个中选择对象“x”和“y” sidebarPanel - datasets
——基本上是创建一个链接。
我尝试了这段代码,但它不起作用:
if (input$location== "Saddle Joint" & input$location== "Gliding Joint") {
updateCheckboxGroupInput(session,
"datasets", "Datasets:", choices = c("x","y"),
selected= c("x","y"))
}
请看截图以获得更好的图片!
谢谢!