Rprog assignment 2