title: Efficient way to apply function to each row of data frame and return list of data frames
body: <p>I have a function that takes a number of arguments and returns a data frame.  I also have a data frame where each row contains the arguments that I'd like to pass to my function, and I'd like to store the resulting set of data frames in a list.  What's an efficient way to do this? (I'm assuming it's some <code>apply</code> like method.)</p>
  
  <p>For example, suppose you have the (meaningless) function</p>
  
  <pre><code>myfunc&lt;-function(dfRow){
    return(data.frame(x=dfRow$x:dfRow$y,y=mean(dfRow$x,dfRow$y)))
  }
  </code></pre>
  
  <p>and the data frame</p>
  
  <pre><code>df&lt;-data.frame(x=1:3,y=4:6)
  df
    x y
  1 1 4
  2 2 5
  3 3 6
  </code></pre>
  
  <p>You can run</p>
  
  <pre><code>myfunc(df[1,])
    x y
  1 1 1
  2 2 1
  3 3 1
  4 4 1
  </code></pre>
  
  <p>but how would you run myfunc for each row of the data frame and store the results in a list?  I know how to do a basic for loop for this, but I'm looking for something that will run faster - something vectorized.</p>