gpt4 book ai didi

r - 将flexdashboard与多个页面不同类型的vertical_layout结合起来

转载 作者:行者123 更新时间:2023-12-02 17:59:07 25 4
gpt4 key购买 nike

我创建了一个具有多个页面的 Flexdashboard 文档。我希望在第一页上使用vetical_layout: fill,但在第二页上我希望使用vertical_layout:scroll。我的文档是这样开始的:

---
title: "DASHBOARD"
output:
flexdashboard::flex_dashboard:
orientation: columns
logo: logo.png
vertical_layout: fill
---

如何使用vertical_layout:scroll查看第二页?

最佳答案

您可以覆盖单个 (H2) 列上的全局 vertical_layout 值。

---
title: "Changing Vertical Layout"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---

```{r setup, include=FALSE}
library(flexdashboard)
library(ggplot2)
```

Page 1
================================

Column {data-width=650}
-----------------------------------------------------------------------

### Panel A
```{r}
qplot(cars$speed)
qplot(cars$dist)
```

Column {data-width=350}
-----------------------------------------------------------------------

### Panel B
```{r}
qplot(cars$speed)
```

### Panel C
```{r}
qplot(cars$dist)
```

Page 2
================================

Column { vertical_layout: scroll}
-----------------------------------------------------------------------

### Panel A
```{r}
qplot(cars$speed)
qplot(cars$dist)
```

```{r}
qplot(cars$speed)
qplot(cars$dist)
```

```{r}
qplot(cars$speed)
qplot(cars$dist)
```

enter image description here enter image description here这是覆盖全局值的类似示例。 (但是 in this case ,他们正在页面(H1)级别更改方向)。

关于r - 将flexdashboard与多个页面不同类型的vertical_layout结合起来,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43225165/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com