title: mapping over the rows of a data frame
body: <p>Suppose I have a data frame with columns c1, ..., cn, and a function f that takes in the columns of this data frame as arguments.
  How can I apply f to each row of the data frame to get a new data frame?</p>
  
  <p>For example,</p>
  
  <pre><code>x = data.frame(letter=c('a','b','c'), number=c(1,2,3))
  # x is
  # letter | number
  #      a | 1
  #      b | 2
  #      c | 3
  
  f = function(letter, number) { paste(letter, number, sep='') }
  
  # desired output is
  # a1
  # b2
  # c3
  </code></pre>
  
  <p>How do I do this? I'm guessing it's something along the lines of {s,l,t}apply(x, f), but I can't figure it out.</p>