Rmd figure file name change


My q is that is there a way to modify the the prefix "unnamed-chunk-", when knitting an Rmarkdown document. I know it is a solution if you change the name of the chunk, but is it possible to change the prefix?

The goal would be that the plots are simple numbered in the figure folder.

Thank you for your help in Advance

Yes! You can do this using the fig.path knitr chunk option in a global setup chunk:


```{r setup, include=FALSE}

Then with unnamed chunks, you should get the desired outcome.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.