assignment 5 R script