R progamming course assignment 2.