R-Programing assignment 2