Explaining the R script for this project