quiz3 of r programming