R script for getdata-005 project