Submitting tested code for Coursera

Submitting tested code for Coursera R programming assignment week 3, for
peer review