One comment

Basically you create a .brew that creates the .rmd that creates the output. That may sound more complicated but is very readable and nicely separates your different objectives (i.e. automated creation of rmarkdown, markdown and html)