我创建了一个具有多个页面的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)
```

r - 在Flexdashboard中与多页不同类型的vertical_layout结合使用-LMLPHP
r - 在Flexdashboard中与多页不同类型的vertical_layout结合使用-LMLPHP
这是覆盖全局值的类似示例。 (但是in this case,他们正在更改页面(H1)级别的方向)。

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

10-09 12:46