title: How can I pass multiple arguments to a function as a single vector?
body: <p>I created the following function with six args:</p>
  
  <pre><code>nDone &lt;- function(under,strike,ttoe,vol,rf,dy) {
      pnorm(((log(under/strike)+ (rf-dy+(vol^2)/2)*ttoe)/(vol*(ttoe^0.5))))
  }
  
  nDone(90,100,3,0.17,0.05,0)
  # Result: 
  [1] 0.6174643
  </code></pre>
  
  <p>Now I create a vector with the same values in an object, and try to call the function using the vector, but get the following error:</p>
  
  <pre><code>d &lt;- c(90,100,3,0.17,0.05,0)
  
  nDone(d)
  
  Error in under/strike : 'strike' is missing
  </code></pre>
  
  <p>What am I doing wrong and how to fix?</p>