r - Flexdashboard (RMarkdown) - 侧边栏中是否可以使用标签集?
问题描述
为这个特定项目使用 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 经验的人能告诉我这样的事情是否可行。
解决方案
对你来说可能有点晚了,但我今天遇到了这个问题并找到了答案。
---
title: "Tabs in Sidebar"
Author: "Derek"
output:
flexdashboard::flex_dashboard:
orientation: rows
---
```{r setup, include=FALSE}
library(flexdashboard)
```
Input {.sidebar}
-------------------------------------
Text for sidebar.
Row
-------------------------------------
### Chart 1
```{r}
```
Row {.tabset .tabset-fade}
-------------------------------------
### Chart 2
```{r}
```
### Chart 3
```{r}
```
推荐阅读
- hibernate - @Formula 字段未被客户端代码识别
- javascript - 防止浏览器在导航到另一个页面时重新加载页面 - angularjs
- git - 如何在 git 分支中重新提交相同的更改
- c++ - 使用 boost::hana 创建一个大的编译时间映射
- reactjs - 反应原生推送通知
- c# - 'variable == true' 与 'true == variable' 之间的性能差异
- visual-studio-code - 调试时 Flutter VS Code 中的热重启(以前是完全重启)
- python - 如何使用字典键值调用函数?
- redirect - IIS 8.5 如何重定向 http://www. 到 https://www。状态码 301?
- android - 在 Android 7 上终止应用程序前台服务后停止但在 Android 6 和 8 设备上工作