Edited the R file, and wrote the body of the the two functions in the program.