A lot of information on knitr is centered around using it for reproducible research. I've found it to be a nice way to make abstraction of mundane reporting though. It is as easy as performing the necessary data extraction and manipulation in an R script, including the creation of tables and graphs.

To develop the report template, simply source the R script within an Rmd one, per the example template below:

:CUSTOM_ID: format-r
title: "My report" date: "=r Sys.time()=" output: pdf_document ---

={r setup, include=FALSE} library(knitr) knitr::opts_chunk$set(echo = TRUE) source('my-report.R')=

Include some text about your report.

##Add a title.

Some further text.

={r, echo=FALSE} plot(my-plot-object) kable(my-df-or-table)=

When you are ready to create the report, the convenience of RMarkdown is hard to beat:

R -e "rmarkdown::render('_{/my-report.Rmd',output_file='}/my-report.pdf')"

Thanks to the YAML header at the start of the report template, information like the report's title and target output format don't need to be mentioned. This command can easily be scripted a bit further to include a date-time stamp in the output filename for instance, and scheduled using cron.