R programming Peer Assignment