title: R: Looping while some parameters are static and some come from vectors
body: <p>I would like to create something like a loop, where I get a vector with two elements. The first element should be the result of the function when the first element of vec_a and vec_b are inserted into the function: </p>
  
  <p><code>example_function(parameter1 = vec_a[1], parameter2 = var_x, parameter3 = vec_b[1], parameter4 = var_y)</code></p>
  
  <p>and the second element should be the result of this:</p>
  
  <p><code>example_function(parameter1 = vec_a[2], parameter2 = var_x, parameter3 = vec_b[2], parameter4 = var_y)</code></p>
  
  <p>Where those are the inputs:</p>
  
  <p><code>vec_a &lt;- c(1.01,1.42)</code></p>
  
  <p><code>vec_b &lt;- c(2.11, 1.99)</code></p>
  
  <p><code>var_x &lt;- 2</code></p>
  
  <p><code>var_y &lt;- 53.97</code></p>
  
  <p>Thanks a lot in advance for your help.</p>