Canada Life Interview Question

Explain some steps in R