title: R: Paste function arguments with list
body: <p>How can I paste arguments to a function using a list.</p>
  
  <p>For example, I want to paste the arguments of <code>l</code> to the function <code>f</code>:</p>
  
  <pre><code>f &lt;- function(a, b, c){
    return(a + b + c)
  }
  
  l &lt;- list(a = 1, b = 2, c = 3)
  
  # here is the error:
  f(unlist(l)) # the expected value is 6
  </code></pre>
  
  <p>Is there a simple/elegant/possible solution for this?</p>
  
  <h1>Edit</h1>
  
  <p>I have a function <code>f</code> that returns a list which should be parsed into another function <code>f.other</code> (which also takes other inputs), and I try to shorten the code. For example</p>
  
  <pre><code>f &lt;- function() list(b = 2, c = 3)
  f.other &lt;- function(a, b, c) a + b + c
  
  l &lt;- f()
  
  # what I try to achieve is this (with shorter code)
  f.other(a = 1, b = l$b, c = l$c)
  
  # something like this
  f.other(a = 1, do.call(l))
  </code></pre>