Debugging and Defensive Programming of R(Assignment 11)

Greetings Professor, In this assignment #11, I learned how to debug the code and to find the errors by using debugging function debug(). In this assignment, by using the given code I have to debug and fix the code in order to run the program. At first in the given code, by trying to run the code the function had trouble in compiling due to an unexpected error. The error is return() is written within in the same line as the for() loop created. By moving the return() function to the next line removed this error. Next is to start the debugging process by using debug() function. In order to accomplish this, I created a matrix 'a' and using it as an input, I ran the program line by line until the next error popped. In this the function tukey.outlier() had not been defined to preventing the tukey_multiple() from running smoothly. As this module focuses on make code run, the tukey.outlier() was excluded in the repetition and tested the code. By doing this the tukey_multiple() was a...