the assignment2 of R Language