我有以下代码用于生成 navbarPage 的闪亮应用程序
library(shiny)
library(shinythemes)
ui <- navbarPage(
title = "Report", theme = shinytheme("cerulean"),
tabPanel("About"),
tabPanel(
"Plots",
fluidPage(
tabsetPanel(
type = "pills",
tabPanel("A"),
tabPanel(
"B",
sidebarLayout(
sidebarPanel(h4("Checkbox"),
checkboxInput("total", label = "total"),
uiOutput("conditionalInput"),
width = 3
),
mainPanel(
tabsetPanel(
tabPanel("a"),
tabPanel("b"),
tabPanel("c"),
tabPanel("d"),
tabPanel("e")
)
)
)
)
)
)
)
)
server <- function(input, output) {
output$conditionalInput <- renderUI({
if (input$total == FALSE) {
checkboxGroupInput("verticais",
label = "",
choices = list(
"1.1" = 1,
"1.2" = 2,
"1.3" = 3, …Run Code Online (Sandbox Code Playgroud)