R markdown ioslides 代码块的增量模式

标签 r knitr r-markdown

如何让 R 代码块逐渐出现?

例如,我将以下选项放在标题中:

---
...other configurations...
output:
  ioslides_presentation:
    incremental: true
---

但是增量模式只适用于项目符号而不适用于代码块
## Slide 1
  * this bullet point appears first
  * this bullet point appears second
```{r eval=FALSE}
# This chunk is there from the beginning
```

所以我的问题是:
你如何让 block 出现在第二个子弹之后?

最佳答案

您可以使用 .build属性

## Slide 1 {.build}
  * this bullet point appears first
  * this bullet point appears second
```{r eval=FALSE}
# This chunk appears third
```

此解决方案有一个小问题:在您第一次使用此幻灯片时,不会显示任何内容。您必须前进两次才能出现第一个项目符号点。

关于R markdown ioslides 代码块的增量模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29899766/

相关文章:

r - Knitr 在/static/文件夹中找不到 img 文件

html - 在 footer.html 中使用 R Markdown 的作者字段

r - ChordDiagram 切断长标签

r - 编写图形并保留顶点名称

r - 仅识别非重复行

r - 编织后不要打开 RStudio 内部浏览器

r - 通过 texreg 输出广义线性模型

Regex Tidyverse,如何捕获表达式(如果存在)

r - 当 output_dir 包含空格时,使用 Rmarkdown 生成 PDF 文档时出错

r - 在 RStudio 中使用 Knit PDF 时如何更改纸张大小?