Coursera programming assignment2 of R programming completed.