【发布时间】:2020-02-03 17:13:31
【问题描述】:
我正在尝试使用 knitr 的选项 results='assis' 在 xaringan 演示文稿中创建各种幻灯片,但它不起作用。
我使用了以下代码:
---
title: "Presentation"
author: ""
date: ""
output:
xaringan::moon_reader:
lib_dir: libs
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---
```{r, results='asis'}
for (i in 1:3) {
cat("---", "\n")
cat("## Slide", i, "\n")
cat("Hello", i)
cat("\n")
}
'''
我希望输出为 3 页,但实际输出为一页。我也试过asis_output 而不是cat。
【问题讨论】:
标签: r-markdown xaringan