r - ConditionalPannels not showing -


i having weird issue when using conditional panels.

i have similar this

shinyui(bootstrappage(   selectinput(inputid = "grapht",               label = "type of graph :",               choices = c("x","y"),               selected =  "x"),   conditionalpanel(       condition = "input.grapht == 'x'",       plotoutput(outputid = "plot1")),  conditionalpanel(       condition = "input.grapht == 'y'",       splitlayout(       cellwidths = c("50%", "50%"),         plotoutput(outputid = "plot1"),         plotoutput(outputid = "plot2")        ))  )) 

if remove either of condition panels, other renders when select correct option. if keep both conditional panels nothing shows, don't error or message, it's not sending input. gives?

the problem have 2 outputs same id plot1. if change in chunk outputid plot3

conditionalpanel(       condition = "input.grapht == 'x'",       plotoutput(outputid = "plot1")), 

and render third plot on server side work.

example:


library(shiny) ui <- shinyui(bootstrappage(     selectinput(inputid = "grapht",               label = "type of graph :",               choices = c("x","y"),               selected =  "x"),     conditionalpanel(     condition = "input.grapht == 'x'",     plotoutput(outputid = "plot3")),    conditionalpanel(     condition = "input.grapht == 'y'",     splitlayout(       cellwidths = c("50%", "50%"),       plotoutput(outputid = "plot1"),       plotoutput(outputid = "plot2")     ))  ))  server <- function(input, output) {  output$plot1 <- renderplot({    plot(1)  })    output$plot2 <- renderplot({    plot(1:10)  })    output$plot3 <- renderplot({    plot(1:100)  }) }  shinyapp(ui, server) 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -