Added comments to the R script