R Programming Course - Programming assignment 2

Completed code