title: Apply function to each cell across multiple dataframes in R
body: <p>Say that I have N identical (same number of rows and columns) dataframes:</p>
  
  <pre><code>set.seed(2)
  df1 &lt;- data.frame(replicate(100,rnorm(100)))
  df2 &lt;- data.frame(replicate(100,rnorm(100)))
  dfN &lt;- data.frame(replicate(100,rnorm(100)))
  </code></pre>
  
  <p>And I want to apply a function (in this case <code>t.test()</code>) across <em>each</em> "cell" of N dataframes so that what returns is a separate dataframe that contains a t value for each cell test performed. Essentially, I want to take the first cell of each dataframe,</p>
  
  <pre><code>one &lt;- df1[1,1]
  two &lt;- df2[1,1]
  Nth &lt;- dfN[1,1]
  </code></pre>
  
  <p>Perform a <code>t.test()</code> on those cells,</p>
  
  <pre><code>first.cell.each &lt;- cbind.data.frame(one,two,Nth)
  t.test(first.cell.each, mu=0)
  </code></pre>
  
  <p>And repeat that across all cells (in this case 10000).</p>
  
  <p>edit: clarified</p>