Almost done with Q2

I also added some R functions that a former PRGS student wrote