Embed Rmd source for a blog post

Is it possible to include the R code for a blogdown post in the generated output?

The code chunks and output are great, but what I'd really like to do is to specify a subset of code chunks to compile into a single .R file that would be linked from the resulting webpage, so my readers can download the complete code in a file, and not have to cut & paste it from individual chunks.

If that's not possible, even just including the source .Rmd file with the page would be helpful.