conditionalPanel链接侧边栏并进行适当的选择 - Shiny R

时间:2016-08-02 14:32:31

标签: shiny shiny-server shinydashboard shinyjs

我有一个如下图所示设计的UI,我想在这里设置一个条件:

UI.R

选择/检查方框" Saddle Joint"在侧边栏location,我想要选项" GEO_10500"," GEO_77298"从侧栏Datasets:中选择。这是我尝试过的服务器代码,但它没有用。让我知道如何实现这一目标。谢谢!

Server.R

conditionalPanel( condition = "input.location = 'Saddle Joint'", updateCheckboxGroupInput(session, "datasets", "Datasets:", choices=c("GEO_10500", "GEO_77298"), selected = "GEO_10500" ) )

Server.R

`

observe({

if ("input.location== 'Saddle Joint'") {

  updateCheckboxGroupInput(session,
                           "datasets", "Datasets:", choices = c("GEO_15602","GEO_21537"),
                           selected= c("GEO_15602","GEO_21537"))
}

})

`

0 个答案:

没有答案