assignment2 of r programming