adding tutorial in R (Paulo's commented version)
Small fixes to tutorial in R, lots of fixes and additions to python
version.
Fixing R tutorial (missing calculations and plots).
fixed conflict