R code | wrote for Business Data Analytics Course in MS in Business Analytics Program, University of Texas at Austin