minor .rmd tweaks and outputting csv files