submission for r programming coursework 2