This is the development code for the coursera R programming course programming exercise 3