programmin assignment 3 of r programming.