Analysis.pdf tutorial added, completely reworked code to comply with knitr rules