R Excercise Problem - I could NOT solve. Can anyone help?

This looks like a homework question. Do not directly copy and paste instructions from your assignment here. Please read this guide:

Also, can you show us your attempts to solve the assignment? If you are stuck on a specific point we may be able to help you.