Create R code - Part #3

Start to work on the code for Part #3.