为此项目使用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经验的人可以告诉我是否可能这样做。
答案 0 :(得分:0)
可能对您来说有点晚了,但是我今天遇到了这个问题并找到了答案。
---
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}
```