Felix Albrecht's solution to Programming Assignment 2 in R-Programming 005