Added comments to R script