missing index on commandArgs() meant knitr options were not being parsed or set correctly