Automatic Report Generation in R, with knitr and markdown

This is a quick introduction to using R, the R package `knitr`, and the markdown language to automatically generate monthly reports.

Let’s say I track electricity usage and expenses for a client. I initially spent a lot of time analyzing and making models for the data, but at this point I’m now in more of a maintenance mode and simply want an updated report to email each month. So, when their new electricity bill arrives I scrape the data into R, save the data in an R workspace, and then use knitr to generate a simplistic HTML report.

Continue reading