Second commit. Added comments to the R script.