Adding R scripts for programming assignment 1