Explaination of the variables used in the R code