问题
How do you turn R code chunks to appear incrementally?
For example, I put the following option in the header:
---
...other configurations...
output:
ioslides_presentation:
incremental: true
---
But the incremental mode only applies to bullets and not to the code chunks
## Slide 1
* this bullet point appears first
* this bullet point appears second
```{r eval=FALSE}
# This chunk is there from the beginning
```
So my question is : How do you make the chunk appear after the second bullet?
回答1:
You can use the .build
attribute
## Slide 1 {.build}
* this bullet point appears first
* this bullet point appears second
```{r eval=FALSE}
# This chunk appears third
```
There is a minor problem to this solution: On your first advancement on this slide, nothing will be displayed. You have to advance twice to make the first bullet point appear.
来源:https://stackoverflow.com/questions/29899766/r-markdown-ioslides-incremental-mode-for-code-chunks