new R code

this changes R is for assignment 2