【问题标题】:Flexdashboard (RMarkdown) - Are tabsets possible within a sidebar?Flexdashboard (RMarkdown) - 侧边栏中是否可以使用标签集?
【发布时间】: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


【解决方案1】:

对你来说可能有点晚了,但我今天遇到了这个问题并找到了答案。

---
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}

```

【讨论】:

  • 不是我想要的...我有兴趣在左侧的“侧边栏”中有一个表格/图表,它是标签式的,以便我可以更改表格/图表通过单击选项卡的侧边栏。不过谢谢你发帖!
猜你喜欢
  • 2018-06-21
  • 2019-05-17
  • 2020-07-26
  • 1970-01-01
  • 2021-07-30
  • 2016-09-19
  • 2020-09-20
  • 1970-01-01
  • 2022-12-20
相关资源
最近更新 更多