title: S4 classes - overload a method with a variable number of arguments
body: <p>I would like to have a variable number of arguments in my S4 generic <code>myMethod</code> such that these are both valid: </p>
  
  <pre><code>myMethod(100)
  myMethod(100, 200)
  </code></pre>
  
  <p>Here is my attempt at a definition: </p>
  
  <pre><code>setGeneric(
      "myMethod", 
      function(x) {
  
          standardGeneric("myMethod")
      })
  
  setMethod(
      "myMethod", 
      signature = c("numeric"), 
      definition = function(x) {
  
          print("MyMethod on numeric")
      })
  
  setMethod(
      "myMethod", 
      signature = c("numeric", "numeric"), 
      definition = function(x, y) {
  
          print("MyMethod on numeric, numeric")
      })
  </code></pre>
  
  <p>However, this gives the error: </p>
  
  <blockquote>
    <p>Error in matchSignature(signature, fdef) : 
      more elements in the method signature (2) than in the generic signature (1) for function ‘myMethod’</p>
  </blockquote>