R script updated for part 2; README updated accordingly