R script for plots CourseProj1