Completed Assignment 2

Upload the completed R functions