在 Shiny 中可以有这样的布局吗?
我理想地想要一个左侧和右侧边栏(我已经看到了一些解决方案shinydashboardPlus
但这不正是我所追求的......)
我有一个与此示例结构类似的应用程序:
mychoices <- c("pick me A",
"pick me - a very long name here",
"no pick me - B",
"another one that is long")
ui <-
navbarPage(
tabPanel("Dataset description",
),
tabPanel("Data",
sidebarLayout(
sidebarPanel(
fluidRow(
column(2,
p(strong("Classes")),
actionButton(inputId = "selectall", label="Select/Deselect all",
style='padding:12px; font-size:80%'),
br(), br(),
checkboxGroupButtons(
inputId = "classes",
choices = mychoices,
selected = mychoices,
direction = "vertical",
width = "100%",
size = "xs",
checkIcon = list(
yes = icon("ok",
lib = "glyphicon"))
),
),
column(6,
br()
),
column(4,
p(strong("Controls")),
p("Transparency"),
sliderInput("trans", NULL,
min = 0, max = 1, value = .5),
actionButton("resetButton", "Zoom/reset plot",
style='padding:6px; font-size:80%'),
actionButton("clear", "Clear selection",
style='padding:6px; font-size:80%'),
actionButton("resetColours", "Reset colours",
style='padding:6px; font-size:80%'),
)
)
),
mainPanel(
tabsetPanel(type = "tabs",
tabPanel("Scatter", id = "panel1",
plotOutput(outputId = "scatter")),
tabPanel("PCA", id = "panel2"))
)
))
)
server <- function(input, output) {}
shinyApp(ui, server)
理想情况下我想拆分sidebarLayout
这样一列位于左侧(类),一列位于右侧(控件),就像应用程序加载时这两列一样像这样重叠 https://stackoverflow.com/questions/63833695/stop-elements-in-a-shiny-sidebarpanel-from-overlapping-in-columns.
请问有什么更好的应用程序设计或解决方案的建议吗?