My question is linked to this one. I wish to include my appendix after my references so I am using the after_body
tag in my yaml, however I need to be able to knit
my appendix.Rmd
file. I have tried the following:
after_body: "`r knitr::knit('appendix.Rmd')`"
however this attempts to knit the appendix.Rmd
file before the actual report and therefore fails as it does not have the required libraries or objects in memory.
In order to have appendices after the references, you simply include a div with id="refs" which tells pandoc where to include the references section. For example:
```{r, child = "08_discussion.Rmd"}
```
# References
<div id="refs"></div>
```{r, child = "09_appendix.Rmd"}
```
Credit: https://twitter.com/tjmahr/status/763435602935095296
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With