added 4 R functions and 4 corresponding plots to the repo