This code block goes at the top of every Rmd file that I create for eventual conversion by knitr
# sets output for inline results nicely
knit_hooks$set(inline = identity)
# kills knitr if there is an error, therefore we don't waste time generating error messages
knit_hooks$set(error = function(x, options) stop(x))
# these are extremely useful options for working in R
options(save.defaults=list(compress="xz"), stringsAsFactors=FALSE)