条件面板上的多个条件

时间:2019-05-05 12:29:23

标签: r shiny

我正在开发闪亮的应用程序,这是我正在运行的代码

ui3=fluidPage(

   sidebarPanel(
    selectInput("outcome","Response", choices=c("continuous","discrete") ),

        conditionalPanel(condition = "input.outcome=='discrete'",
             selectInput("discreteoutcome","Response",choices = c("categorical","count")),

               conditionalPanel(condition = "input.discreteoutcome='categorical'",
                  selectInput("category","category",choices=c("binary","multinomial")),

在以下两个条件下我需要帮助,对于二进制和多项式,问题是,当用户选择二进制时,界面会显示二进制和多项式的输入框

                    conditionalPanel(condition = "input.category=='binary'",textInput("pi", "pi",0.4) )),

                      conditionalPanel(condition = "input.category='multinomial'",
                            textInput("pi1","pi1",0.2),textInput("pi2","pi2",0.8))),

            conditionalPanel(condition = "input.outcome=='continuous'",textInput("mean",1))))

server3=shinyServer(function(input,output){
})

shinyApp(ui3,server3)

0 个答案:

没有答案