[R-PROG] Solution for Assignment2.