conditionalPanel Display but condition is not met - R Shiny -
i have started ui using shiny r, having problem layout of page.
the problem facing second conditionalpanel showing though not selected. put selected='item1' in radiobuttons, checkboxgroupinput of item2 showing well.
what problem here , how go around fixing it? there error or mistake in code?
library("shiny") shinyui(navbarpage("title", tabpanel("subtitle1", sidebarlayout( sidebarpanel( checkboxgroupinput("variable1","items:", c("item1","item2"))), mainpanel( plotoutput("plot") ) ) ), tabpanel("subtitle2", sidebarlayout( sidebarpanel( radiobuttons( inputid="item", label="item selection:", choices=list( "item1","item2"), selected='item1' ), # show when item1 selected. become invisible when other items selected. conditionalpanel( condition="input.item == 'item1'", checkboxgroupinput( "variable2", "countries:", choices=names(quantityi), selected= "world.") ), # show when item2 selected. become invisible when other items selected. conditionalpanel( condition="input.item == 'item2'", checkboxgroupinput( "variable2", "countries:", choices=names(quantityi), selected= "world.") ) ), mainpanel( plotoutput("plot") ) ) )))
i have found solution problem. thank lot wannes rosiers, have found , troubleshoot error.
for both mainpanel @ tabpanel subtitle1 , subtitle2, both of having same plotoutput, "plot",
mainpanel( plotoutput("plot") )
both of them should have different output, though not sure reason behind it.
Comments
Post a Comment