title: Setting default arguments to `...`
body: <p>I have a function where I'm passing <code>...</code> to <code>plot</code>, so the user can add additional arguments. For some of these optional arguments, I'd like to setup default values, without declaring them as formal arguments in the function. Here's a simple example</p>
  
  <pre><code>simpleFun &lt;- function(a, b,...) {
      args &lt;- as.list(match.call())
      if(is.null(args$xlim)) args$xlim &lt;- quote(c(-6, 6))
  
      plot(a, b, xlim = eval(args$xlim))
  }
  </code></pre>
  
  <p>Then I can run <code>simpleFun(rnorm(10), rnorm(10), xlim = c(-1, 1))</code> or <code>simpleFun(rnorm(10), rnorm(10))</code> and <code>xlim</code> will be <code>c(-1, 1)</code> in the first example (defined by user) and <code>c(-6, 6)</code> in the second (not defined by user). The problem, of course, is that <code>...</code> is now not going anywhere. I'd like to specify it more like</p>
  
  <pre><code>simpleFun2 &lt;- function(a, b,...) {
      args &lt;- as.list(match.call())
      if(is.null(args$xlim)) args$xlim &lt;- quote(c(-6, 6))
  
      plot(a, b, xlim = eval(args$xlim), ...)
  }
  </code></pre>
  
  <p>so that any additional argument can be passed to <code>plot</code>, but then calling <code>simpleFun(rnorm(10), rnorm(10), xlim = c(-1, 1))</code> won't work because there will be two <code>xlim</code> arguments supplied to <code>plot</code>. </p>
  
  <p>So, basically, I'm wondering if there's a way to set default values for any arguments passed through <code>...</code>? I realize the way I've defined things above is probably less than ideal, but it's the best I've come up with at this point (which still doesn't work).</p>