title: Making a string concatenation operator in R
body: <p>I was wondering how one might go about writing a string concatenation operator in R, something like || in SAS, + in Java/C# or &amp; in Visual Basic.</p>
  
  <p>The easiest way would be to create a special operator using %, like</p>
  
  <pre><code>`%+%` &lt;- function(a, b) paste(a, b, sep="")
  </code></pre>
  
  <p>but this leads to lots of ugly <code>%</code>'s in the code.</p>
  
  <p>I noticed that <code>+</code> is defined in the Ops group, and you can write S4 methods for that group, so perhaps something like that would be the way to go. However, I have no experience with S4 language features at all. How would I modify the above function to use S4?</p>