Is there a way to programmatically change the chunk label in an r markdown document? I need to know because I use the same chunks more than one time as part of child-rmarkdown rendering.
This is an example of what I intended (and yes I know this code doesn't work). Has anyone a brilliant idea?
---
output:
pdf_document:
latex_engine: xelatex
mainfont: Calibri Light
---
```{r results="asis", eval=TRUE, echo=FALSE, message=FALSE, error=FALSE}
i <- 1
```
```{r paste0("graphname",i), results="asis",eval=TRUE,echo=FALSE,message=FALSE, error=FALSE, warning=FALSE, comment = "",fig.height=1.6,fig.width=5.8,include=FALSE, fig.path="plots/"}
library(ggplot2)
qplot(c(1,2,3),c(2,3,4))
```