小编Mat*_*urt的帖子

闪亮:如何将sidebarPanel嵌入tabPanel中?

我试图在一个单独的选项卡中有一个selecInput面板,但我不确定该怎么做。在函数tabPanel()内,我尝试在函数plotOutput()之后立即包含sidebarPanel(),但是sidebarPanel不再位于侧面,而是位于左侧,并且与直方图重叠。是否有一种方法可以将侧面板正确地嵌入到特定的选项卡中,或者将侧面板显示在图形的右侧?谢谢,下面是我使用的代码:

mainPanel(
    tabsetPanel(
      tabPanel("Histogram",plotOutput("histogram")),
      tabPanel("Scatter",plotOutput("scatter"),
               sidebarPanel(
  selectInput("xaxis", label = "x axis",
              choices = detectors, selected = detectors[1],width='200px',selectize=FALSE),
  selectInput("yaxis", label = "y axis",
              choices = detectors, selected = detectors[2],width='200px',selectize=FALSE),
  selectInput("population1", label = "Population 1",
              choices = files, selected = files[1],width='200px',selectize=FALSE),
  selectInput("population2", label = "Population 2",
              choices = files, selected = files[1],width='200px',selectize=FALSE),
  selectInput("population3", label = "Population 3",
              choices = files, selected = files[1],width='200px',selectize=FALSE)
  )
),
      tabPanel("Table", DT::dataTableOutput("table"))
    )
)
Run Code Online (Sandbox Code Playgroud)

markdown r shiny

3
推荐指数
1
解决办法
2141
查看次数

标签 统计

markdown ×1

r ×1

shiny ×1