Module# 11: Debugging R functions assignment

Hello, I am not familiar with what this function is meant to do. I think it is for finding outliers in huge multi-dimensional containers like data.frames or matrix. Here is my code along with comments:


I like debugging because you learn a lot from your errors. The more error you make, the more you learn to code right, and debug future codes faster. To debug this I first started with a single dimension container vector, rather a vector of 10 numbers. I did that because I wanted to know if it will produce the common "dim(x)...." error, it did, so I knew this function is meant to work with 2D or 3D containers. Then I passed in a data.frame, which then led me to deduce an error which was calling a function which doesn't exist. Then I fixed that. And lastly, I checked with a made up matrix, it also works with that. All in all, no error now!

~Thank you,
Mihir!

Comments