R-scripts for 5 tasks as described in README.md