在同一文档的末尾列出一个 knitr 类型文档的完整代码

List the full code of a knitr-type document at the end of the same document

One chunk silently generates output.

```{r, echo = FALSE}
summary(cars)
```

How can the same chunk be automatically listed at the end like this?

```
summary(cars)
```

knitr::purl 带有参数 eval = FALSE 如果它存在的话会起作用。

最好按名称列出各个区块。

我在knitr book第一版的12.1.4节有提到过,基本上就是:

```{r ref.label=knitr::all_labels()}
```