【发布时间】:2019-02-17 20:34:25
【问题描述】:
为这个特定项目使用 RMarkdown。
我的 flexdashboard 中有一个侧边栏。如果可能的话,我想在我的仪表板的侧边栏中有一个标签集,但是我在让它工作时遇到了问题。我的选项卡式数据最终出现在仪表板的主要部分,而不是侧边栏中。
title: "Tabs in Sidebar"
Author: "Derek"
output: flexdashboard
Main Page {data-orientation=rows}
=================================
Column {.sidebar}
---------------------------------
## Sidebar Title {.tabset}
### Tab 1
Content for tab 1 goes here
### Tab 2
Content for tab 2 goes here
Row {}
---------------------------------
Main page content is here
我也尝试过类似的方法,为每个标题添加一个额外的哈希,但无济于事:
title: "Tabs in Sidebar"
Author: "Derek"
output: flexdashboard
Main Page {data-orientation=rows}
=================================
Column {.sidebar}
---------------------------------
### Sidebar Title {.tabset}
#### Tab 1
Content for tab 1 goes here
#### Tab 2
Content for tab 2 goes here
Row {}
---------------------------------
Main page content is here
希望有 RMarkdown 经验的人能告诉我这样的事情是否可行。
【问题讨论】:
-
我不确定是否可以在 Flex 侧边栏中使用选项卡。如果您需要在侧边栏中为小部件提供更多空间,则可能的替代方法是 shinyWidgets 包的下拉按钮。它公开和隐藏小部件集群。此处的示例库:shinyapps.dreamrs.fr/shinyWidgets 选择下拉列表和 sweetalert 链接以激活。
标签: r r-markdown flexdashboard