Added comments to R scripts

Final version