Mocking allows the programmer to temporarily substitute custom code for part of a given function. This can be useful in a variety of scenarios:
- When needing stubs or fakes for unit tests
- To replace a not yet completed function, particularly helpful in test driven development
- When for whatever reason R is doing something you don’t want it to do, like accessing the internet, reading files from a strange location, or printing graphs incorrectly.
Max is a danish Computer Science student currently in final year at the University of Bath after completing a placement year with Mango.
He is particularly interested in ML, and is currently working on a dissertation aimed at predicting capacity levels on public transportation.