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