【发布时间】:2016-07-21 20:10:34
【问题描述】:
我正在尝试在特定选项卡内设置一个 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"))
)
)
【问题讨论】:
-
仅使用部分代码很难理解输出。如果您提供一个服务器和 UI 的最小可重现示例,那就更好了。
-
您似乎没有在任何地方调用 sideBarLayout()...
-
sideBarLayout() 是我想要的。简单,谢谢!