【发布时间】:2015-05-20 00:07:00
【问题描述】:
我有一个闪亮的应用程序,其中包含两个相关的分析。在每个分析中,都有几种不同类型的结果。
界面变得非常繁忙,我希望输出元素可以折叠 (maybe like this)。
有这种类型的ui 文件的例子吗?我现在的样子是这样的:
shinyUI(
fluidPage(
tabsetPanel(
tabPanel("Analysis 1",
sidebarPanel(
sliderInput("value1", "some value",
min=1, max=20, value=5, step=0.2)
),
mainPanel(
## these two elements collapse together
p(textOutput("results_1_a_text")),
plotOutput("results_1_a_graph", height = "400px"),
## these two elements collapse together
p(textOutput("results_1_b_text")),
plotOutput("results_1_b_graph", height = "400px")
)
),
tabPanel("Analysis 2",
sidebarPanel(
sliderInput("value2", "some value",
min=1, max=20, value=5, step=0.2)
),
mainPanel(
## these two elements collapse together
p(textOutput("results_2_a_text")),
plotOutput("results_2_a_graph", height = "400px"),
## these two elements collapse together
p(textOutput("results_2_b_text")),
plotOutput("results_2_b_graph", height = "400px")
)
)
)
)
)
谢谢,
最大
【问题讨论】:
-
可折叠是什么意思?这个例子我不清楚..
-
为什么不使用shinydashboard,因为它内置了这个功能
-
Colonel - the link 显示了折叠内容的示例。我希望能够折叠由服务器文件生成的一系列结果(例如文本、绘图等)。
-
pops - 我现在正在看,但它似乎有点矫枉过正。另外,我必须完全重写 ui 文件。我希望有更简洁的东西。
-
好的,看看 ShinyBS 然后ebailey78.github.io/shinyBS/changes.html