【发布时间】:2020-01-19 07:24:41
【问题描述】:
我想在 conditionalPanel 上设置一个条件,只要 selectInput 包含 1,就会显示 conditionalPanel。
我不熟悉 JavaScript,有人可以帮忙吗?
library(shiny)
library(shinydashboard)
ui <- function() {
dashboardPage(dashboardHeader(),
dashboardSidebar(
selectInput(inputId = "month", label = "Month", choices = 1:12, multiple = TRUE)
),
dashboardBody(
conditionalPanel(condition = "input.month == '1'", h1("success"))
),
skin = "blue")
}
server <- function(input, output, session) {
}
shinyApp(ui, server)
【问题讨论】:
标签: javascript r shiny shinydashboard