Hello everyone, I would like to give my pdf file a dynamic file name. I already found out that you can name it after the current Sys.Date(), but naming the file after the data being processed in the script is somehow not possible.. Although the document title can be named dynamically by just creating a second YAML section below the R code chunk, where the data is being processed. It does not work with the output file name.
The dynamic title is working fine. But my code to name my file dynamically after the nrows of the given dataframe does not work and is just ignored. Is there any solution to this problem?
Yes, knit: field is a trick as this is used by RStudio IDE to modify the behavior of the render button by passing a custom function.
I don't think there is an easy way to name your output file from within the code of you rmarkdown. A wrapper that will render and then rename the output based on some information (written in a file by your Rmd document content ?) seems the easiest solution