Source: https://hellor.netlify.app/msc/STA_517_3_0_Programming_and_Data_Analysis_with_R_MSc_2020.pdf