0

I have an UI designed as shown in the picture below, and I want to actually set a condition here such that:

UI.R

On selecting/checking the box "Saddle Joint" from the sidebar location, I want the options "GEO_10500", "GEO_77298" to be chosen from the sidebar Datasets:. Here's the server code I tried and it didn't work. Let me know how this could be achieved. Thanks!

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"))
}

})

`

Harriss
  • 13
  • 1
  • 8
  • @ Dean Attali : Could you help me with this? – Harriss Aug 02 '16 at 14:59
  • `conditionalPanel` is to be used on the ui side and you cannot combine it with `updateCheckboxGroupInput` which is to be used on the server side. You should instead use `observeEvent` and `update...` on the server side. – Xiongbing Jin Aug 02 '16 at 16:05
  • @warmoverflow : ` observeEvent(input$location=="Saddle Joint", { updateCheckboxGroupInput(session, "datasets", "Datasets:", choices = "x", selected= "x") })` I tried this on the server side and the datasets get checked on before I even make a selection from the location panel? – Harriss Aug 02 '16 at 16:38

0 Answers0