我正在尝试在rmarkdown中编写报告,然后使用knitr生成pdf.
我希望将所有代码推送到"文档的结尾",同时只显示与我的文本交织的结果.该echo='hold'选项不会这样做.
Generate data
```{r chunk1,echo='hold',R.options=}
num_seq<-rnorm(100,0.2)
num_seq
```
We further report the mean of these numbers.
```{r,echo='hold' }
mean(num_seq)
```
Run Code Online (Sandbox Code Playgroud)
我试过阅读这里找到的相关文档http://yihui.name/knitr/options/,但我无法弄清楚如何做到这一点.