How does operator overloading work in the S3 system (e.g. defining print or + methods for a class)?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks how operator overloading works in R's S3 object system, using print and plus methods for a custom class as the example. Tests method naming and dispatch, the Ops group generic, how operators with two operands are dispatched, and common pitfalls in method code.