我创建了一个具有多个页面的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)
```
这是覆盖全局值的类似示例。 (但是in this case,他们正在更改页面(H1)级别的方向)。
关于r - 在Flexdashboard中与多页不同类型的vertical_layout结合使用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/43225165/