Adding extra to make new knitr version work.  Replacing `require()` with `library()`; inspired by http://yihui.name/en/2014/07/library-vs-require/