title: apply function for every ith row and use columns as arguments
body: <p>I am sorry if this question has been asked before, but could not find a solution to my problem. Which <code>apply</code>-like function fits the below case?</p>
  
  <p>I have an <code>R</code> function which has 3 arguments <code>(x, y, z)</code>. What it does is basically to call an <code>PostgreSQL</code> function which quires <code>x, y, z</code> and retrieve a dataframe consisting of corresponding values <code>a, b, c</code>, something like this;</p>
  
  <pre><code>myfunc &lt;- function(x, y, z){
    get.df &lt;- fn$sqldf("SELECT * FROM retrieve_meta_data('$x', '$y', '$z')")
  # get.df is a dataframe consisting of x number of rows and columns a, b, c
  # some dataframe manipulation... 
    return(get.df)
  }
  </code></pre>
  
  <p>What I am looking for is to call this function by using a dataframe <code>(call.df)</code> with x number of rows and columns <code>x, y, z</code>. So <code>apply</code> the function for each ith row and using the columns as arguments. </p>
  
  <p>I have looked through a range of <code>apply</code>-like functions but I have failed so far. It's probably way easy.</p>
  
  <p>I imagine something like <code>apply(call.df, c(1,2), myfunc)</code> but this gives the error;</p>
  
  <pre><code>Error in eval(expr, envir, enclos) : 
  argument "y" is missing, with no default
  </code></pre>
  
  <p>I hope am clear enough without supplying any dummy data. Any pointers would be very much appreciated, thanks! </p>