R Programming - Switch Statement and Looping Techniques.