I'm doing OOP R and was wondering how to make it so the + can be used to add custom objects together. The most common example of this I've found is in ggplot2 w/ adding geoms together.
I read through the ggplot2 source code and found this
https://github.com/hadley/ggplot2/blob/master/R/plot-construction.r
It looks like "%+%" is being used, but it's not clear how that eventually translates into the plain + operator.
+to be dispatched onggobjects.methods("+")confirms there is a method forgg. - Chase