RL_*_*Pug 6 r r-markdown shiny shinydashboard flexdashboard
这是我的仪表板模板的外观。我有一个 {.tabset} 来显示 2020 年 12 月和 2020 年 1 月的两个不同表格。但该表格并不像生成的区域那么长,实际上只达到了一半。
我想要的输出是这样的。
但我不知道如何在不加入 {.tabset} 或创建新列的情况下添加另一个级别。
这是我的 Rmarkdown 模板
---
title: "Example Demo Dash"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
runtime: shiny
---
# Tab 1
Column
-----------------------------------------------------------------------
### Tab 1 Graph
# Tab 2
Column {data-width=450, .tabset}
-----------------------------------------------------------------------
### December 2020
### Janurary 2020
Column {data-width=200}
-----------------------------------------------------------------------
### Tab 2 Col 2 Graph 1
### Tab 2 Col 2 Graph 1
### Tab 2 Col 2 Graph 3
### Tab 2 Col 2 Graph 3
Column {data-width=350}
-----------------------------------------------------------------------
### Col 3 graph 1
### Col 3 graph 2
# tab 3
Run Code Online (Sandbox Code Playgroud)
正如此处回答并在此 GitHub 问题中提到的,当前不支持在 3 级标题处或以下创建选项卡集。
为了解决这个问题,我们可以tabsetPanel()手动构建选项卡集。请注意,我们需要将选项卡的内容作为tabPanel()参数直接传递给 。
根据您的示例更新了 R Markdown:
---
title: "Example Demo Dash"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
runtime: shiny
---
# Tab 1
Column
-----------------------------------------------------------------------
### Tab 1 Graph
# Tab 2
Column {data-width=450}
-----------------------------------------------------------------------
### Tabs
```{r}
tabsetPanel(
tabPanel("December 2020",
"Things about December 2020"),
tabPanel("Janurary 2020",
"Things about Janurary 2020")
)
```
### Col 3 Graph 1
Column {data-width=200}
-----------------------------------------------------------------------
### Tab 2 Col 2 Graph 1
### Tab 2 Col 2 Graph 1
### Tab 2 Col 2 Graph 3
### Tab 2 Col 2 Graph 3
Column {data-width=350}
-----------------------------------------------------------------------
### Col 3 graph 1
### Col 3 graph 2
# tab 3
Run Code Online (Sandbox Code Playgroud)