This is the R script for the assignment