third assignment of R in coursera