use include=FALSE is enough to exclude the output of this chunk
this hook function is useless for this ggplot2 guide (it is for base graphics only)
use opts_chunk$set() instead of the deprecated \SweaveOpts{}
update knitr website url
no need to turn on dev mode, and ggplot2 should be installed from hadley's repos
these packages are loaded in the Rnw file
we take are of syntax highlighting setting inside the Rnw file; no need to set it outside the document

if bw_version does not exist, set it to FALSE by default
theme_text() was deprecated
if hadley.jpg does not exist, download it from hadley's website
R logo is included in every R installation
mostly syntax changes, e.g. use quotes for character options
ignore auxiliary files