title: How to programmatically change chunk label in r markdown
body: <p>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.</p>
  
  <p>This is an example of what I intended (and yes I know this code doesn't work). Has anyone a brilliant idea?</p>
  
  <pre><code>---
  output:
    pdf_document: 
      latex_engine: xelatex
  mainfont: Calibri Light
  ---
  
  ```{r results="asis", eval=TRUE, echo=FALSE, message=FALSE, error=FALSE}
  i &lt;- 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))
  ```
  </code></pre>