Move R code out of bayesian tex file into R files
Add bayesian references