creation functions

Functions created for the programming assignment 2 of the R Programming
course